java.lang.Object
com.yahoo.container.di.componentgraph.core.Node
Direct Known Subclasses:
ComponentNode, ComponentRegistryNode, GuiceNode

public abstract class Node extends Object
Author:
Tony Vaagenes, gjoranv, ollivir
  • Field Details

  • Constructor Details

    • Node

      public Node(com.yahoo.component.ComponentId componentId)
  • Method Details

    • instanceKey

      public abstract com.google.inject.Key<?> instanceKey()
    • usedComponents

      public abstract List<Node> usedComponents()
      The components actually used by this node. Consist of a subset of the injected nodes + subset of the global nodes.
    • newInstance

      protected abstract Object newInstance()
    • constructInstance

      public void constructInstance()
      Constructs the instance represented by this node, if not already done.
    • component

      public Object component()
      Returns the component represented by this - which is either the instance, or if the instance is a provider, the component returned by it.
    • configKeys

      public abstract Set<com.yahoo.vespa.config.ConfigKey<com.yahoo.config.ConfigInstance>> configKeys()
    • inject

      public void inject(Node component)
    • injectAll

      public void injectAll(Collection<ComponentNode> componentNodes)
    • instanceType

      public abstract Class<?> instanceType()
    • componentType

      public abstract Class<?> componentType()
    • label

      public abstract String label()
    • idAndType

      public String idAndType()
    • equalEdges

      public static boolean equalEdges(List<?> edges1, List<?> edges2)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • componentId

      public com.yahoo.component.ComponentId componentId()
    • constructedInstance

      public Optional<?> constructedInstance()
      Returns the already constructed instance in this, if any
    • syntheticComponentId

      protected static com.yahoo.component.ComponentId syntheticComponentId(String className, Object identityObject, com.yahoo.component.ComponentId namespace)
      Parameters:
      identityObject - he identifying object that makes the Node unique
    • packageName

      public static String packageName(Class<?> componentClass)