org.aspectj.org.eclipse.jdt.internal.core.hierarchy
Class HierarchyBuilder

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.hierarchy.HierarchyBuilder
Direct Known Subclasses:
IndexBasedHierarchyBuilder, RegionBasedHierarchyBuilder

public abstract class HierarchyBuilder
extends java.lang.Object


Field Summary
protected  java.lang.String focusQualifiedName
           
protected  TypeHierarchy hierarchy
          The hierarchy being built.
protected  HierarchyResolver hierarchyResolver
          The resolver used to resolve type hierarchies
protected  java.util.Map infoToHandle
          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  NameLookup nameLookup
           
 
Constructor Summary
HierarchyBuilder(TypeHierarchy hierarchy)
           
 
Method Summary
abstract  void build(boolean computeSubtypes)
           
protected  void buildSupertypes()
          Configure this type hierarchy by computing the supertypes only.
 void connect(IGenericType type, IType typeHandle, IType superclassHandle, IType[] superinterfaceHandles)
          Connect the supplied type to its superclass & superinterfaces.
protected  ICompilationUnit createCompilationUnitFromPath(Openable handle, IFile file)
          Create an ICompilationUnit info from the given compilation unit on disk.
protected  IBinaryType createInfoFromClassFile(Openable handle, IResource file)
          Creates the type info from the given class file on disk and adds it to the given list of infos.
protected  IBinaryType createInfoFromClassFileInJar(Openable classFile)
          Create a type info from the given class file in a jar and adds it to the given list of infos.
protected  IType getHandle(IGenericType genericType, ReferenceBinding binding)
          Returns a handle for the given generic type or null if not found.
protected  IType getType()
           
protected  IType lookupBinaryHandle(IBinaryType typeInfo)
          Looks up and returns a handle for the given binary info.
protected  void worked(IProgressMonitor monitor, int work)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hierarchy

protected TypeHierarchy hierarchy
The hierarchy being built.


nameLookup

protected NameLookup nameLookup
See Also:
NameLookup

hierarchyResolver

protected HierarchyResolver hierarchyResolver
The resolver used to resolve type hierarchies

See Also:
HierarchyResolver

infoToHandle

protected java.util.Map infoToHandle
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).


focusQualifiedName

protected java.lang.String focusQualifiedName
Constructor Detail

HierarchyBuilder

public HierarchyBuilder(TypeHierarchy hierarchy)
                 throws JavaModelException
Throws:
JavaModelException
Method Detail

build

public abstract void build(boolean computeSubtypes)
                    throws JavaModelException,
                           CoreException
Throws:
JavaModelException
CoreException

buildSupertypes

protected void buildSupertypes()
Configure this type hierarchy by computing the supertypes only.


connect

public void connect(IGenericType type,
                    IType typeHandle,
                    IType superclassHandle,
                    IType[] superinterfaceHandles)
Connect the supplied type to its superclass & superinterfaces. The superclass & superinterfaces are the identical binary or source types as supplied by the name environment.


getHandle

protected IType getHandle(IGenericType genericType,
                          ReferenceBinding binding)
Returns a handle for the given generic type or null if not found.


getType

protected IType getType()

lookupBinaryHandle

protected IType lookupBinaryHandle(IBinaryType typeInfo)
Looks up and returns a handle for the given binary info.


worked

protected void worked(IProgressMonitor monitor,
                      int work)

createCompilationUnitFromPath

protected ICompilationUnit createCompilationUnitFromPath(Openable handle,
                                                         IFile file)
Create an ICompilationUnit info from the given compilation unit on disk.


createInfoFromClassFile

protected IBinaryType createInfoFromClassFile(Openable handle,
                                              IResource file)
Creates the type info from the given class file on disk and adds it to the given list of infos.


createInfoFromClassFileInJar

protected IBinaryType createInfoFromClassFileInJar(Openable classFile)
Create a type info from the given class file in a jar and adds it to the given list of infos.