com.google.inject.grapher
Class NodeId

java.lang.Object
  extended by com.google.inject.grapher.NodeId

public final class NodeId
extends Object

ID of a node in the graph. An ID is given by a 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.

Author:
bojand@google.com (Bojan Djordjevic)

Nested Class Summary
static class NodeId.NodeType
          Type of node.
 
Method Summary
 boolean equals(Object obj)
           
 Key<?> getKey()
           
 int hashCode()
           
static NodeId newInstanceId(Key<?> key)
           
static NodeId newTypeId(Key<?> key)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newTypeId

public static NodeId newTypeId(Key<?> key)

newInstanceId

public static NodeId newInstanceId(Key<?> key)

getKey

public Key<?> getKey()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2014 Google, Inc.. All Rights Reserved.