Interface IHierarchy
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AspectJElementHierarchy
- Author:
- Mik Kersten, Andy Clement
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToFileMap
(String canonicalFilePath, IProgramElement compilationUnitProgramElement) findCloserMatchForLineNumber
(IProgramElement node, int lineno) For a specified node, check if any of the children more accurately represent the specified line.findElementForHandle
(String handle) findElementForHandleOrCreate
(String handle, boolean create) findElementForLabel
(IProgramElement parent, IProgramElement.Kind kind, String label) Returns the first matchfindElementForOffSet
(String sourceFilePath, int lineNumber, int offSet) findElementForSignature
(IProgramElement parent, IProgramElement.Kind kind, String signature) Returns the first matchfindElementForSourceFile
(String sourceFile) findElementForSourceLine
(String sourceFilePath, int lineNumber) Never returns nullfindElementForSourceLine
(ISourceLocation location) TODO: discriminate columnsfindElementForType
(String packageName, String typeName) findInFileMap
(String key) findNodeForSourceFile
(IProgramElement node, String sourcefilePath) Discover the node representing a particular source file.void
void
getElement
(String handle) getRoot()
boolean
isValid()
boolean
removeFromFileMap
(String canonicalFilePath) void
setConfigFile
(String configFile) default void
setFileMap
(HashMap<String, IProgramElement> fileMap) void
setFileMap
(Map<String, IProgramElement> fileMap) void
setRoot
(IProgramElement root) void
updateHandleMap
(Set<String> deletedFiles)
-
Field Details
-
NO_STRUCTURE
-
-
Method Details
-
getElement
-
getRoot
IProgramElement getRoot() -
setRoot
-
addToFileMap
-
removeFromFileMap
-
setFileMap
-
setFileMap
-
findInFileMap
-
getFileMapEntrySet
Set<Map.Entry<String,IProgramElement>> getFileMapEntrySet() -
isValid
boolean isValid() -
findElementForHandle
-
findElementForHandleOrCreate
-
findElementForSignature
IProgramElement findElementForSignature(IProgramElement parent, IProgramElement.Kind kind, String signature) Returns the first match- Parameters:
parent
-kind
- not null- Returns:
- null if not found
-
findElementForLabel
IProgramElement findElementForLabel(IProgramElement parent, IProgramElement.Kind kind, String label) Returns the first match- Parameters:
parent
-kind
- not null- Returns:
- null if not found
-
findElementForType
- Parameters:
packageName
- if null default package is searchedtypeName
- can't be null
-
findElementForSourceFile
- Parameters:
sourceFile
- modified to '/' delimited path for consistency- Returns:
- a new structure node for the file if it was not found in the model
-
findElementForSourceLine
TODO: discriminate columns -
findElementForSourceLine
Never returns null- Parameters:
sourceFilePath
- canonicalized path for consistencylineNumber
- 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
-
getConfigFile
String getConfigFile() -
setConfigFile
-
flushTypeMap
void flushTypeMap() -
flushHandleMap
void flushHandleMap() -
updateHandleMap
-
findCloserMatchForLineNumber
For a specified node, check if any of the children more accurately represent the specified line.- Parameters:
node
- where to start lookinglineno
- the line number- Returns:
- any closer match below 'node' or null if nothing is a more accurate match
-
findNodeForSourceFile
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
-