Package com.google.inject.grapher
Class NodeId
- java.lang.Object
-
- com.google.inject.grapher.NodeId
-
public final class NodeId extends java.lang.ObjectID of a node in the graph. An ID is given by aKeyand a node type, which is used to distinguish instances and implementation classes for the same key. For examplebind(Integer.class).toInstance(42)produces two nodes: an interface node with the key ofKey<Integer>and an instance node with the sameKeyand value of 42.- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeId.NodeTypeType of node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Key<?>getKey()inthashCode()static NodeIdnewInstanceId(Key<?> key)static NodeIdnewTypeId(Key<?> key)java.lang.StringtoString()
-
-
-
Method Detail
-
getKey
public Key<?> getKey()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-