Package org.aspectj.asm.internal
Class RelationshipMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,List<IRelationship>>,IRelationshipMap
public class RelationshipMap
extends HashMap<String,List<IRelationship>>
implements IRelationshipMap
- Author:
- Mik Kersten, Andy Clement
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all of the relationships in the map.get(String source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)Return a relationship matching the kind and name for the given element.get(IProgramElement source)get(IProgramElement source, IRelationship.Kind kind, String relationshipName)Return a relationship matching the kind and name for the given element.get(IProgramElement source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)Return a relationship matching the kind and name for the given element.voidput(String source, IRelationship relationship)voidput(IProgramElement source, IRelationship relationship)booleanremove(String source, IRelationship relationship)voidMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
RelationshipMap
public RelationshipMap()
-
-
Method Details
-
get
- Specified by:
getin interfaceIRelationshipMap- Returns:
- list of relationships or null if the source element has no relationships
-
get
- Specified by:
getin interfaceIRelationshipMap- Returns:
- list of relationships or null if the source element has no relationships
-
get
public IRelationship get(String source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)Description copied from interface:IRelationshipMapReturn a relationship matching the kind and name for the given element. Creates the relationship if not found.- Specified by:
getin interfaceIRelationshipMap- Returns:
- null if the relationship is not found.
-
get
public IRelationship get(IProgramElement source, IRelationship.Kind kind, String relationshipName, boolean runtimeTest, boolean createIfMissing)Description copied from interface:IRelationshipMapReturn a relationship matching the kind and name for the given element.- Specified by:
getin interfaceIRelationshipMap- Returns:
- null if the relationship is not found.
-
get
Description copied from interface:IRelationshipMapReturn a relationship matching the kind and name for the given element.- Specified by:
getin interfaceIRelationshipMap- Returns:
- null if the relationship is not found.
-
remove
- Specified by:
removein interfaceIRelationshipMap
-
removeAll
- Specified by:
removeAllin interfaceIRelationshipMap
-
put
- Specified by:
putin interfaceIRelationshipMap
-
put
- Specified by:
putin interfaceIRelationshipMap
-
clear
public void clear()Description copied from interface:IRelationshipMapClear all of the relationships in the map.- Specified by:
clearin interfaceIRelationshipMap- Specified by:
clearin interfaceMap<String,List<IRelationship>>- Overrides:
clearin classHashMap<String,List<IRelationship>>
-
getEntries
- Specified by:
getEntriesin interfaceIRelationshipMap
-