Package com.google.inject.grapher
Class Node
- java.lang.Object
-
- com.google.inject.grapher.Node
-
- Direct Known Subclasses:
ImplementationNode
,InstanceNode
,InterfaceNode
public abstract class Node extends java.lang.Object
Node in a guice dependency graph.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private NodeId
id
(package private) static boolean
ignoreSourceInComparisons
When set to true, the source object is ignored inequals(java.lang.Object)
andhashCode()
.private java.lang.Object
source
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Node
copy(NodeId id)
Returns a copy of the node with a new ID.boolean
equals(java.lang.Object obj)
NodeId
getId()
java.lang.Object
getSource()
int
hashCode()
-
-
-
Field Detail
-
ignoreSourceInComparisons
static boolean ignoreSourceInComparisons
When set to true, the source object is ignored inequals(java.lang.Object)
andhashCode()
. Only used in tests.
-
id
private final NodeId id
-
source
private final java.lang.Object source
-
-
Constructor Detail
-
Node
protected Node(NodeId id, java.lang.Object source)
-
-
Method Detail
-
getId
public NodeId getId()
-
getSource
public java.lang.Object getSource()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-