Top Fields Methods
org.aspectj.asm

public Interface IHierarchy

extends Serializable
Known Direct Implementers
org.aspectj.asm.internal.AspectJElementHierarchy
Imports
java.io.Serializable, java.util.HashMap, .Map, .Set, org.aspectj.asm.internal.ProgramElement, org.aspectj.bridge.ISourceLocation

Authors
Mik Kersten, Andy Clement

Field Summary

Modifier and TypeField and Description
public static final IProgramElement

Method Summary

Modifier and TypeMethod and Description
public void
addToFileMap(String canonicalFilePath, IProgramElement compilationUnitProgramElement)

public IProgramElement

Returns:

any closer match below 'node' or null if nothing is a more accurate match
findCloserMatchForLineNumber
(IProgramElement
where to start looking
node
,
int
the line number
lineno
)

For a specified node, check if any of the children more accurately represent the specified line.

public IProgramElement
public IProgramElement
findElementForHandleOrCreate(String handle, boolean create)

public IProgramElement

Returns:

null if not found
findElementForLabel
(IProgramElement parent, IProgramElement.Kind
not null
kind
,
String label)

Returns the first match

public IProgramElement
findElementForOffSet(String sourceFilePath, int lineNumber, int offSet)

public IProgramElement

Returns:

null if not found
findElementForSignature
(IProgramElement parent, IProgramElement.Kind
not null
kind
,
String signature)

Returns the first match

public IProgramElement

Returns:

a new structure node for the file if it was not found in the model
findElementForSourceFile
(String
modified to '/' delimited path for consistency
sourceFile
)

public IProgramElement
findElementForSourceLine(ISourceLocation location)

TODO: discriminate columns

public IProgramElement

Returns:

a new structure node for the file if it was not found in the model
findElementForSourceLine
(String
canonicalized path for consistency
sourceFilePath
,
int
if 0 or 1 the corresponding file node will be returned
lineNumber
)

Never returns null

public IProgramElement
findElementForType(String
if null default package is searched
packageName
,
String
can't be null
typeName
)

public IProgramElement
public IProgramElement

Returns:

the node representing that source file or null if it cannot be found
findNodeForSourceFile
(IProgramElement
where in the model to start looking (usually the root on the initial call)
node
,
String
the source file being searched for
sourcefilePath
)

Discover the node representing a particular source file.

public void
public void
public String
public IProgramElement
public Set<Map.Entry<String, IProgramElement>>
public IProgramElement
public boolean
public boolean
removeFromFileMap(String canonicalFilePath)

public void
setConfigFile(String configFile)

public void
public default void
public void
public void
updateHandleMap(Set<String> deletedFiles)

Field Detail

NO_STRUCTUREback to summary
public static final IProgramElement NO_STRUCTURE

Method Detail

addToFileMapback to summary
public void addToFileMap(String canonicalFilePath, IProgramElement compilationUnitProgramElement)
findCloserMatchForLineNumberback to summary
public IProgramElement findCloserMatchForLineNumber(IProgramElement node, int lineno)

For a specified node, check if any of the children more accurately represent the specified line.

Parameters
node:IProgramElement

where to start looking

lineno:int

the line number

Returns:IProgramElement

any closer match below 'node' or null if nothing is a more accurate match

findElementForHandleback to summary
public IProgramElement findElementForHandle(String handle)
findElementForHandleOrCreateback to summary
public IProgramElement findElementForHandleOrCreate(String handle, boolean create)
findElementForLabelback to summary
public IProgramElement findElementForLabel(IProgramElement parent, IProgramElement.Kind kind, String label)

Returns the first match

Parameters
kind:IProgramElement.Kind

not null

Returns:IProgramElement

null if not found

findElementForOffSetback to summary
public IProgramElement findElementForOffSet(String sourceFilePath, int lineNumber, int offSet)
findElementForSignatureback to summary
public IProgramElement findElementForSignature(IProgramElement parent, IProgramElement.Kind kind, String signature)

Returns the first match

Parameters
kind:IProgramElement.Kind

not null

Returns:IProgramElement

null if not found

findElementForSourceFileback to summary
public IProgramElement findElementForSourceFile(String sourceFile)
Parameters
sourceFile:String

modified to '/' delimited path for consistency

Returns:IProgramElement

a new structure node for the file if it was not found in the model

findElementForSourceLineback to summary
public IProgramElement findElementForSourceLine(ISourceLocation location)

TODO: discriminate columns

findElementForSourceLineback to summary
public IProgramElement findElementForSourceLine(String sourceFilePath, int lineNumber)

Never returns null

Parameters
sourceFilePath:String

canonicalized path for consistency

lineNumber:int

if 0 or 1 the corresponding file node will be returned

Returns:IProgramElement

a new structure node for the file if it was not found in the model

findElementForTypeback to summary
public IProgramElement findElementForType(String packageName, String typeName)
Parameters
packageName:String

if null default package is searched

typeName:String

can't be null

findInFileMapback to summary
public IProgramElement findInFileMap(String key)
findNodeForSourceFileback to summary
public IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath)

Discover the node representing a particular source file.

Parameters
node:IProgramElement

where in the model to start looking (usually the root on the initial call)

sourcefilePath:String

the source file being searched for

Returns:IProgramElement

the node representing that source file or null if it cannot be found

flushHandleMapback to summary
public void flushHandleMap()
flushTypeMapback to summary
public void flushTypeMap()
getConfigFileback to summary
public String getConfigFile()
getElementback to summary
public IProgramElement getElement(String handle)
getFileMapEntrySetback to summary
public Set<Map.Entry<String, IProgramElement>> getFileMapEntrySet()
getRootback to summary
public IProgramElement getRoot()
isValidback to summary
public boolean isValid()
removeFromFileMapback to summary
public boolean removeFromFileMap(String canonicalFilePath)
setConfigFileback to summary
public void setConfigFile(String configFile)
setFileMapback to summary
public void setFileMap(Map<String, IProgramElement> fileMap)
setFileMapback to summary
public default void setFileMap(HashMap<String, IProgramElement> fileMap)
setRootback to summary
public void setRoot(IProgramElement root)
updateHandleMapback to summary
public void updateHandleMap(Set<String> deletedFiles)