Class Node

java.lang.Object
com.google.inject.grapher.Node
Direct Known Subclasses:
ImplementationNode, InstanceNode, InterfaceNode

public abstract class Node extends Object
Node in a guice dependency graph.
Since:
4.0
  • Field Details

    • ignoreSourceInComparisons

      static boolean ignoreSourceInComparisons
      When set to true, the source object is ignored in equals(java.lang.Object) and hashCode(). Only used in tests.
    • id

      private final NodeId id
    • source

      private final Object source
  • Constructor Details

  • Method Details

    • getId

      public NodeId getId()
    • getSource

      public Object getSource()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • copy

      public abstract Node copy(NodeId id)
      Returns a copy of the node with a new ID.
      Parameters:
      id - new ID of the node
      Returns:
      copy of the node with a new ID