return;
}
// check known cases
if (node instanceof SimpleType) {
SimpleType simpleType = (SimpleType) node;
ITypeBinding typeBinding = simpleType.resolveBinding();
checkNode(node, typeBinding);
} else if (node instanceof SimpleName) {
SimpleName simpleName = (SimpleName) node;
if (simpleName.resolveBinding().getKind() == IBinding.TYPE
&& node.getLocationInParent() == MethodInvocation.EXPRESSION_PROPERTY) {
ITypeBinding typeBinding = simpleName.resolveTypeBinding();
checkNode(node, typeBinding);
}
}
}
private void checkNode(ASTNode node, ITypeBinding typeBinding) throws Exception {
if (typeBinding != null) {
// ignore generics type variable
if (typeBinding.isTypeVariable()) {
return;
}
// only top level types can be found as source
while (typeBinding.getDeclaringClass() != null) {
typeBinding = typeBinding.getDeclaringClass();
}
// check this type
String typeName = AstNodeUtils.getFullyQualifiedName(typeBinding, true);
if (isSecondarySourceType(typeName)) {
return;