Example usage for org.eclipse.jdt.internal.core.hierarchy HierarchyResolver subOrSuperOfFocus

List of usage examples for org.eclipse.jdt.internal.core.hierarchy HierarchyResolver subOrSuperOfFocus

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core.hierarchy HierarchyResolver subOrSuperOfFocus.

Prototype

public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) 

Source Link

Usage

From source file:org.eclipse.ajdt.internal.core.search.ExtraITDFinder.java

License:Open Source License

private boolean isSubtypeOfSearchPattern(char[] targetTypeName, IntertypeElement itd,
        HierarchyResolver resolver) throws JavaModelException {
    char[] itdTargetTypeName = fullyQualifiedTargetTypeName(itd);
    if (CharOperation.equals(targetTypeName, itdTargetTypeName)) {
        return true;
    }/*from  w  w  w . j  a  v  a 2 s .c  om*/
    if (resolver != null) {
        ReferenceBinding targetBinding = ((LookupEnvironment) ReflectionUtils
                .getPrivateField(HierarchyResolver.class, "lookupEnvironment", resolver))
                        .askForType(CharOperation.splitOn('.', itdTargetTypeName));
        if (targetBinding != null) {
            return resolver.subOrSuperOfFocus(targetBinding);
        }
    }
    return false;
}