Package dagger.spi.model
Class ComponentPath
- java.lang.Object
-
- dagger.spi.model.ComponentPath
-
public abstract class ComponentPath extends java.lang.ObjectA path containing a component and all of its ancestor components.
-
-
Constructor Summary
Constructors Constructor Description ComponentPath()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanatRoot()ComponentPathchildPath(DaggerTypeElement child)Returns the path from the root component to thechildof the current component.abstract com.google.common.collect.ImmutableList<DaggerTypeElement>components()Returns the component types, starting from the root component and ending with the current component.static ComponentPathcreate(java.lang.Iterable<DaggerTypeElement> components)Returns a newComponentPathfromcomponents.DaggerTypeElementcurrentComponent()Returns the component at the end of the path.abstract booleanequals(java.lang.Object obj)abstract inthashCode()ComponentPathparent()Returns this path's parent path.DaggerTypeElementparentComponent()Returns the parent of the currentComponent() current component}.DaggerTypeElementrootComponent()Returns the rootComponent- orProductionComponent-annotated typejava.lang.StringtoString()
-
-
-
Method Detail
-
create
public static ComponentPath create(java.lang.Iterable<DaggerTypeElement> components)
Returns a newComponentPathfromcomponents.
-
components
public abstract com.google.common.collect.ImmutableList<DaggerTypeElement> components()
Returns the component types, starting from the root component and ending with the current component.
-
rootComponent
public final DaggerTypeElement rootComponent()
Returns the rootComponent- orProductionComponent-annotated type
-
currentComponent
@Memoized public DaggerTypeElement currentComponent()
Returns the component at the end of the path.
-
parentComponent
public final DaggerTypeElement parentComponent()
Returns the parent of the currentComponent() current component}.- Throws:
java.lang.IllegalStateException- if the current graph is the root component
-
parent
public final ComponentPath parent()
Returns this path's parent path.- Throws:
java.lang.IllegalStateException- if the current graph is the root component
-
childPath
public final ComponentPath childPath(DaggerTypeElement child)
Returns the path from the root component to thechildof the current component.
-
atRoot
public final boolean atRoot()
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
@Memoized public abstract int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public abstract boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-