Top Description Methods
org.aspectj.asm

public Interface IRelationshipMap

extends Serializable
Known Direct Implementers
org.aspectj.asm.internal.RelationshipMap
Imports
java.io.Serializable, java.util.List, .Set

Maps from a program element handles to a list of relationships between that element and other program elements. Each element in the list or relationships is uniquely identified by a kind and a relationship name. For example, the advice affecting a particular shadow (e.g. method call) can be retrieved by calling get on the handle for that method. Symmetrically the method call shadows that an advice affects can be retrieved.

The elements can be stored and looked up as IProgramElement(s), in which cases the element corresponding to the handle is looked up in the containment hierarchy.

put/get methods taking IProgramElement as a parameter are for convenience only. They work identically to calling their counterparts with IProgramElement.getIdentifierHandle()

Authors
Mik Kersten, Andy Clement

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clear all of the relationships in the map.

public List<IRelationship>

Returns:

list of relationships or null if the source element has no relationships
get
(IProgramElement sourceProgramElement)

public List<IRelationship>

Returns:

list of relationships or null if the source element has no relationships
get
(String sourceHandle)

public IRelationship

Returns:

null if the relationship is not found.
get
(IProgramElement source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)

Return a relationship matching the kind and name for the given element.

public IRelationship

Returns:

null if the relationship is not found.
get
(IProgramElement source, IRelationship.Kind kind, String relationshipName)

Return a relationship matching the kind and name for the given element.

public IRelationship

Returns:

null if the relationship is not found.
get
(String source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)

Return a relationship matching the kind and name for the given element.

public Set<String>
public void
put(IProgramElement source, IRelationship relationship)

public void
put(String handle, IRelationship relationship)

public boolean
remove(String handle, IRelationship relationship)

public void
removeAll(String source)

Method Detail

clearback to summary
public void clear()

Clear all of the relationships in the map.

getback to summary
public List<IRelationship> get(IProgramElement sourceProgramElement)
Returns:List<IRelationship>

list of relationships or null if the source element has no relationships

getback to summary
public List<IRelationship> get(String sourceHandle)
Returns:List<IRelationship>

list of relationships or null if the source element has no relationships

getback to summary
public IRelationship get(IProgramElement source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)

Return a relationship matching the kind and name for the given element.

Returns:IRelationship

null if the relationship is not found.

getback to summary
public IRelationship get(IProgramElement source, IRelationship.Kind kind, String relationshipName)

Return a relationship matching the kind and name for the given element.

Returns:IRelationship

null if the relationship is not found.

getback to summary
public IRelationship get(String source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)

Return a relationship matching the kind and name for the given element. Creates the relationship if not found.

Returns:IRelationship

null if the relationship is not found.

getEntriesback to summary
public Set<String> getEntries()
putback to summary
public void put(IProgramElement source, IRelationship relationship)
putback to summary
public void put(String handle, IRelationship relationship)
removeback to summary
public boolean remove(String handle, IRelationship relationship)
removeAllback to summary
public void removeAll(String source)