Package dagger.model
Class ComponentPath
- java.lang.Object
-
- dagger.model.ComponentPath
-
public abstract class ComponentPath extends java.lang.Object
A 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 boolean
atRoot()
ComponentPath
childPath(javax.lang.model.element.TypeElement child)
Returns the path from the root component to thechild
of the current component.abstract com.google.common.collect.ImmutableList<javax.lang.model.element.TypeElement>
components()
Returns the component types, starting from the root component and ending with the current component.static ComponentPath
create(java.lang.Iterable<javax.lang.model.element.TypeElement> components)
Returns a newComponentPath
fromcomponents
.javax.lang.model.element.TypeElement
currentComponent()
Returns the component at the end of the path.abstract boolean
equals(java.lang.Object obj)
abstract int
hashCode()
ComponentPath
parent()
Returns this path's parent path.javax.lang.model.element.TypeElement
parentComponent()
Returns the parent of the currentComponent() current component}.javax.lang.model.element.TypeElement
rootComponent()
Returns the rootComponent
- orProductionComponent
-annotated typejava.lang.String
toString()
-
-
-
Method Detail
-
create
public static ComponentPath create(java.lang.Iterable<javax.lang.model.element.TypeElement> components)
Returns a newComponentPath
fromcomponents
.
-
components
public abstract com.google.common.collect.ImmutableList<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 rootComponent
- orProductionComponent
-annotated type
-
currentComponent
@Memoized 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}.- 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(javax.lang.model.element.TypeElement child)
Returns the path from the root component to thechild
of the current component.
-
atRoot
public final boolean atRoot()
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
@Memoized public abstract int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public abstract boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-