Package com.google.inject.grapher
Class NodeId
- java.lang.Object
-
- com.google.inject.grapher.NodeId
-
public final class NodeId extends java.lang.Object
ID of a node in the graph. An ID is given by aKey
and 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 sameKey
and value of 42.- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeId.NodeType
Type of node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Key<?>
getKey()
int
hashCode()
static NodeId
newInstanceId(Key<?> key)
static NodeId
newTypeId(Key<?> key)
java.lang.String
toString()
-
-
-
Method Detail
-
getKey
public Key<?> getKey()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-