Package dagger.model

Class ComponentPath

  • public abstract class ComponentPath
    extends java.lang.Object
    A path containing a component and all of its ancestor components.
    • Constructor Detail

      • ComponentPath

        public ComponentPath()
    • Method Detail

      • create

        public static ComponentPath create​(java.lang.Iterable<javax.lang.model.element.TypeElement> components)
        Returns a new ComponentPath from components.
      • components

        public abstract<javax.lang.model.element.TypeElement> components()
        Returns the component types, starting from the root component and ending with the current component.
      • rootComponent

        public final javax.lang.model.element.TypeElement rootComponent()
        Returns the root Component- or ProductionComponent-annotated type
      • currentComponent

        public javax.lang.model.element.TypeElement currentComponent()
        Returns the component at the end of the path.
      • parentComponent

        public final javax.lang.model.element.TypeElement parentComponent()
        Returns the parent of the currentComponent() current component}.
        java.lang.IllegalStateException - if the current graph is the root component
      • parent

        public final ComponentPath parent()
        Returns this path's parent path.
        java.lang.IllegalStateException - if the current graph is the root component
      • childPath

        public final ComponentPath childPath​(javax.lang.model.element.TypeElement child)
        Returns the path from the root component to the child of the current component.
      • toString

        public final java.lang.String toString()
        toString in class java.lang.Object
      • hashCode

        public abstract int hashCode()
        hashCode in class java.lang.Object
      • equals

        public abstract boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object