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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
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.void
put
(String source, IRelationship relationship) void
put
(IProgramElement source, IRelationship relationship) boolean
remove
(String source, IRelationship relationship) void
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
RelationshipMap
public RelationshipMap()
-
-
Method Details
-
get
- Specified by:
get
in interfaceIRelationshipMap
- Returns:
- list of relationships or null if the source element has no relationships
-
get
- Specified by:
get
in 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:IRelationshipMap
Return a relationship matching the kind and name for the given element. Creates the relationship if not found.- Specified by:
get
in 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:IRelationshipMap
Return a relationship matching the kind and name for the given element.- Specified by:
get
in interfaceIRelationshipMap
- Returns:
- null if the relationship is not found.
-
get
Description copied from interface:IRelationshipMap
Return a relationship matching the kind and name for the given element.- Specified by:
get
in interfaceIRelationshipMap
- Returns:
- null if the relationship is not found.
-
remove
- Specified by:
remove
in interfaceIRelationshipMap
-
removeAll
- Specified by:
removeAll
in interfaceIRelationshipMap
-
put
- Specified by:
put
in interfaceIRelationshipMap
-
put
- Specified by:
put
in interfaceIRelationshipMap
-
clear
public void clear()Description copied from interface:IRelationshipMap
Clear all of the relationships in the map.- Specified by:
clear
in interfaceIRelationshipMap
- Specified by:
clear
in interfaceMap<String,
List<IRelationship>> - Overrides:
clear
in classHashMap<String,
List<IRelationship>>
-
getEntries
- Specified by:
getEntries
in interfaceIRelationshipMap
-