// //TODO - seems to be the case for AJ - not intuitive
// if (info instanceof ConstructorInfo) {
// // target(..) does not match for constructors
// return Boolean.FALSE;
// }
ClassInfo declaringType = null;
if (info instanceof MemberInfo) {
// if method/field is static, target(..) is evaluated to false
if (Modifier.isStatic(((MemberInfo) info).getModifiers())) {
return Boolean.FALSE;
}
declaringType = ((MemberInfo) info).getDeclaringType();
} else if (info instanceof ClassInfo) {
declaringType = (ClassInfo) info;
}
String boundedTypeName = node.getBoundedType(m_expressionInfo);
// check if the context we match is an interface call, while the bounded type of target(..) is not an
// interface. In such a case we will need a runtime check
if (declaringType.isInterface()) {
// if we are a instanceof (subinterface) of the bounded type, then we don't need a runtime check
if (ClassInfoHelper.instanceOf(declaringType, boundedTypeName)) {
return Boolean.TRUE;
} else {
//System.out.println("*** RT check for " + boundedTypeName + " when I am " + declaringType.getName());