org.aspectj.asm
Interface IRelationshipMap

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

public interface IRelationshipMap
extends java.io.Serializable

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()


Method Summary
 void clear()
          Clear all of the relationships in the map.
 java.util.List<IRelationship> get(IProgramElement sourceProgramElement)
           
 IRelationship get(IProgramElement source, IRelationship.Kind kind, java.lang.String relationshipName)
          Return a relationship matching the kind and name for the given element.
 IRelationship get(IProgramElement source, IRelationship.Kind kind, java.lang.String relationshipName, boolean runtimeTest, boolean createIfMissing)
          Return a relationship matching the kind and name for the given element.
 java.util.List<IRelationship> get(java.lang.String sourceHandle)
           
 IRelationship get(java.lang.String source, IRelationship.Kind kind, java.lang.String relationshipName, boolean runtimeTest, boolean createIfMissing)
          Return a relationship matching the kind and name for the given element.
 java.util.Set<java.lang.String> getEntries()
           
 void put(IProgramElement source, IRelationship relationship)
           
 void put(java.lang.String handle, IRelationship relationship)
           
 boolean remove(java.lang.String handle, IRelationship relationship)
           
 void removeAll(java.lang.String source)
           
 

Method Detail

get

java.util.List<IRelationship> get(IProgramElement sourceProgramElement)
Returns:
list of relationships or null if the source element has no relationships

get

java.util.List<IRelationship> get(java.lang.String sourceHandle)
Returns:
list of relationships or null if the source element has no relationships

get

IRelationship get(IProgramElement source,
                  IRelationship.Kind kind,
                  java.lang.String relationshipName,
                  boolean runtimeTest,
                  boolean createIfMissing)
Return a relationship matching the kind and name for the given element.

Returns:
null if the relationship is not found.

get

IRelationship get(IProgramElement source,
                  IRelationship.Kind kind,
                  java.lang.String relationshipName)
Return a relationship matching the kind and name for the given element.

Returns:
null if the relationship is not found.

get

IRelationship get(java.lang.String source,
                  IRelationship.Kind kind,
                  java.lang.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:
null if the relationship is not found.

put

void put(IProgramElement source,
         IRelationship relationship)

put

void put(java.lang.String handle,
         IRelationship relationship)

remove

boolean remove(java.lang.String handle,
               IRelationship relationship)

removeAll

void removeAll(java.lang.String source)

clear

void clear()
Clear all of the relationships in the map.


getEntries

java.util.Set<java.lang.String> getEntries()