public final class NodeId
extends java.lang.Object
Key and a node type, which is used to
distinguish instances and implementation classes for the same key. For example
bind(Integer.class).toInstance(42) produces two nodes: an
interface node with the key of Key<Integer> and an instance node with the same
Key and value of 42.| Modifier and Type | Class and Description |
|---|---|
static class |
NodeId.NodeType
Type of node.
|
| Modifier and Type | Field and Description |
|---|---|
private Key<?> |
key |
private NodeId.NodeType |
nodeType |
| Modifier | Constructor and Description |
|---|---|
private |
NodeId(Key<?> key,
NodeId.NodeType nodeType) |
| Modifier and Type | Method and 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() |
private final Key<?> key
private final NodeId.NodeType nodeType
private NodeId(Key<?> key, NodeId.NodeType nodeType)
public Key<?> getKey()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object