Class IndexBasedHierarchyBuilder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder
org.aspectj.org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder
- All Implemented Interfaces:
SuffixConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MapCache used to record binaries recreated from index matchesstatic final intprotected IJavaSearchScopeThe scope this hierarchy builder should restrain results to.Fields inherited from class HierarchyBuilder
focusQualifiedName, hierarchy, hierarchyResolver, infoToHandle, nameLookupModifier and TypeFieldDescriptionprotected Stringprotected TypeHierarchyThe hierarchy being built.protected HierarchyResolverThe resolver used to resolve type hierarchiesprotected Map<IGenericType, IJavaElement> A temporary cache of infos to handles to speed info to handle translation - it only contains the entries for the types in the region (in other words, it contains no supertypes outside the region).protected NameLookupFields inherited from interface SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVAModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final char[]static final char[]static final char[]static final char[]static final char[]static final char[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(boolean computeSubtypes) protected IBinaryTypecreateInfoFromClassFile(Openable classFile, org.eclipse.core.resources.IResource file) Creates the type info from the given class file on disk and adds it to the given list of infos.protected IBinaryTypecreateInfoFromClassFileInJar(Openable classFile) Create a type info from the given class file in a jar and adds it to the given list of infos.static voidsearchAllPossibleSubTypes(IType type, IJavaSearchScope scope, Map binariesFromIndexMatches, IPathRequestor pathRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor monitor) Find the set of candidate subtypes of a given type.Methods inherited from class HierarchyBuilder
buildSupertypes, connect, createCompilationUnitFromPath, getHandle, getType, lookupBinaryHandle, workedModifier and TypeMethodDescriptionprotected voidConfigure this type hierarchy by computing the supertypes only.voidconnect(IGenericType type, IType typeHandle, IType superclassHandle, IType[] superinterfaceHandles) Connect the supplied type to its superclass and superinterfaces.protected ICompilationUnitcreateCompilationUnitFromPath(Openable handle, org.eclipse.core.resources.IFile file, char[] moduleName) Create an ICompilationUnit info from the given compilation unit on disk.protected ITypegetHandle(IGenericType genericType, ReferenceBinding binding) Returns a handle for the given generic type or null if not found.protected ITypegetType()protected ITypelookupBinaryHandle(IBinaryType typeInfo) Looks up and returns a handle for the given binary info.protected voidworked(org.eclipse.core.runtime.IProgressMonitor monitor, int work)
-
Field Details
-
MAXTICKS
public static final int MAXTICKS- See Also:
-
scope
The scope this hierarchy builder should restrain results to. -
binariesFromIndexMatches
Cache used to record binaries recreated from index matches
-
-
Constructor Details
-
IndexBasedHierarchyBuilder
public IndexBasedHierarchyBuilder(TypeHierarchy hierarchy, IJavaSearchScope scope) throws JavaModelException - Throws:
JavaModelException
-
-
Method Details
-
build
public void build(boolean computeSubtypes) - Specified by:
buildin classHierarchyBuilder
-
createInfoFromClassFile
protected IBinaryType createInfoFromClassFile(Openable classFile, org.eclipse.core.resources.IResource file) Description copied from class:HierarchyBuilderCreates the type info from the given class file on disk and adds it to the given list of infos.- Overrides:
createInfoFromClassFilein classHierarchyBuilder
-
createInfoFromClassFileInJar
Description copied from class:HierarchyBuilderCreate a type info from the given class file in a jar and adds it to the given list of infos.- Overrides:
createInfoFromClassFileInJarin classHierarchyBuilder
-
searchAllPossibleSubTypes
public static void searchAllPossibleSubTypes(IType type, IJavaSearchScope scope, Map binariesFromIndexMatches, IPathRequestor pathRequestor, int waitingPolicy, org.eclipse.core.runtime.IProgressMonitor monitor) Find the set of candidate subtypes of a given type. The requestor is notified of super type references (with actual path of its occurrence) for all types which are potentially involved inside a particular hierarchy. The match locator is not used here to narrow down the results, the type hierarchy resolver is rather used to compute the whole hierarchy at once.
-