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.ObjectNode in a guice dependency graph.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private NodeIdid(package private) static booleanignoreSourceInComparisonsWhen set to true, the source object is ignored inequals(java.lang.Object)andhashCode().private java.lang.Objectsource
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Nodecopy(NodeId id)Returns a copy of the node with a new ID.booleanequals(java.lang.Object obj)NodeIdgetId()java.lang.ObjectgetSource()inthashCode()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-