org.aspectj.asm
Interface IHierarchy

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AspectJElementHierarchy

public interface IHierarchy
extends java.io.Serializable


Field Summary
static IProgramElement NO_STRUCTURE
           
 
Method Summary
 void addToFileMap(java.lang.String canonicalFilePath, IProgramElement compilationUnitProgramElement)
           
 IProgramElement findCloserMatchForLineNumber(IProgramElement node, int lineno)
          For a specified node, check if any of the children more accurately represent the specified line.
 IProgramElement findElementForHandle(java.lang.String handle)
           
 IProgramElement findElementForHandleOrCreate(java.lang.String handle, boolean create)
           
 IProgramElement findElementForLabel(IProgramElement parent, IProgramElement.Kind kind, java.lang.String label)
          Returns the first match
 IProgramElement findElementForOffSet(java.lang.String sourceFilePath, int lineNumber, int offSet)
           
 IProgramElement findElementForSignature(IProgramElement parent, IProgramElement.Kind kind, java.lang.String signature)
          Returns the first match
 IProgramElement findElementForSourceFile(java.lang.String sourceFile)
           
 IProgramElement findElementForSourceLine(ISourceLocation location)
          TODO: discriminate columns
 IProgramElement findElementForSourceLine(java.lang.String sourceFilePath, int lineNumber)
          Never returns null
 IProgramElement findElementForType(java.lang.String packageName, java.lang.String typeName)
           
 java.lang.Object findInFileMap(java.lang.Object key)
           
 IProgramElement findNodeForSourceFile(IProgramElement node, java.lang.String sourcefilePath)
          Discover the node representing a particular source file.
 void flushHandleMap()
           
 void flushTypeMap()
           
 java.lang.String getConfigFile()
           
 IProgramElement getElement(java.lang.String handle)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,IProgramElement>> getFileMapEntrySet()
           
 IProgramElement getRoot()
           
 boolean isValid()
           
 boolean removeFromFileMap(java.lang.String canonicalFilePath)
           
 void setConfigFile(java.lang.String configFile)
           
 void setFileMap(java.util.HashMap<java.lang.String,IProgramElement> fileMap)
           
 void setRoot(IProgramElement root)
           
 void updateHandleMap(java.util.Set<java.lang.String> deletedFiles)
           
 

Field Detail

NO_STRUCTURE

static final IProgramElement NO_STRUCTURE
Method Detail

getElement

IProgramElement getElement(java.lang.String handle)

getRoot

IProgramElement getRoot()

setRoot

void setRoot(IProgramElement root)

addToFileMap

void addToFileMap(java.lang.String canonicalFilePath,
                  IProgramElement compilationUnitProgramElement)

removeFromFileMap

boolean removeFromFileMap(java.lang.String canonicalFilePath)

setFileMap

void setFileMap(java.util.HashMap<java.lang.String,IProgramElement> fileMap)

findInFileMap

java.lang.Object findInFileMap(java.lang.Object key)

getFileMapEntrySet

java.util.Set<java.util.Map.Entry<java.lang.String,IProgramElement>> getFileMapEntrySet()

isValid

boolean isValid()

findElementForHandle

IProgramElement findElementForHandle(java.lang.String handle)

findElementForHandleOrCreate

IProgramElement findElementForHandleOrCreate(java.lang.String handle,
                                             boolean create)

findElementForSignature

IProgramElement findElementForSignature(IProgramElement parent,
                                        IProgramElement.Kind kind,
                                        java.lang.String signature)
Returns the first match

Parameters:
parent -
kind - not null
Returns:
null if not found

findElementForLabel

IProgramElement findElementForLabel(IProgramElement parent,
                                    IProgramElement.Kind kind,
                                    java.lang.String label)
Returns the first match

Parameters:
parent -
kind - not null
Returns:
null if not found

findElementForType

IProgramElement findElementForType(java.lang.String packageName,
                                   java.lang.String typeName)
Parameters:
packageName - if null default package is searched
className - can't be null

findElementForSourceFile

IProgramElement findElementForSourceFile(java.lang.String sourceFile)
Parameters:
sourceFilePath - modified to '/' delimited path for consistency
Returns:
a new structure node for the file if it was not found in the model

findElementForSourceLine

IProgramElement findElementForSourceLine(ISourceLocation location)
TODO: discriminate columns


findElementForSourceLine

IProgramElement findElementForSourceLine(java.lang.String sourceFilePath,
                                         int lineNumber)
Never returns null

Parameters:
sourceFilePath - canonicalized path for consistency
lineNumber - if 0 or 1 the corresponding file node will be returned
Returns:
a new structure node for the file if it was not found in the model

findElementForOffSet

IProgramElement findElementForOffSet(java.lang.String sourceFilePath,
                                     int lineNumber,
                                     int offSet)

getConfigFile

java.lang.String getConfigFile()

setConfigFile

void setConfigFile(java.lang.String configFile)

flushTypeMap

void flushTypeMap()

flushHandleMap

void flushHandleMap()

updateHandleMap

void updateHandleMap(java.util.Set<java.lang.String> deletedFiles)

findCloserMatchForLineNumber

IProgramElement findCloserMatchForLineNumber(IProgramElement node,
                                             int lineno)
For a specified node, check if any of the children more accurately represent the specified line.

Parameters:
node - where to start looking
lineno - the line number
Returns:
any closer match below 'node' or null if nothing is a more accurate match

findNodeForSourceFile

IProgramElement findNodeForSourceFile(IProgramElement node,
                                      java.lang.String sourcefilePath)
Discover the node representing a particular source file.

Parameters:
node - where in the model to start looking (usually the root on the initial call)
sourcefilePath - the source file being searched for
Returns:
the node representing that source file or null if it cannot be found