public class InspectableComponent
extends java.lang.Object
DebugComponent
exposing only information that are safe to use for test
assertions.Modifier and Type | Method and Description |
---|---|
Drawable |
getBackground() |
Rect |
getBounds() |
Rect |
getBoundsInLithoView() |
java.util.List<InspectableComponent> |
getChildComponents()
Get the list of components composed by this component.
|
EventHandler |
getClickHandler() |
Component |
getComponent() |
java.lang.Class |
getComponentClass() |
ComponentHost |
getComponentHost() |
java.lang.Object |
getComponentTag() |
java.lang.String |
getComponentTestKey()
Returns this component's testKey or null if none is set.
|
java.lang.CharSequence |
getContentDescription() |
boolean |
getFocusable() |
Drawable |
getForeground() |
java.lang.String |
getId() |
java.lang.Integer |
getImportantForAccessibility() |
java.lang.String |
getKey() |
LithoView |
getLithoView() |
Drawable |
getMountedDrawable() |
View |
getMountedView() |
java.lang.String |
getName() |
InspectableComponent |
getNestedInstance(Component component)
Obtain an instance of a Component nested inside the given inspectable Component.
|
static InspectableComponent |
getRootInstance(LithoView view) |
java.lang.String |
getSimpleName() |
StateContainer |
getStateContainer() |
java.lang.String |
getTestKey() |
java.lang.String |
getTextContent() |
java.lang.String |
toString() |
public static InspectableComponent getRootInstance(LithoView view)
InspectableComponent
of a LithoView.public InspectableComponent getNestedInstance(Component component)
public java.lang.String getName()
public java.lang.String getSimpleName()
public java.lang.Class getComponentClass()
public java.util.List<InspectableComponent> getChildComponents()
View
s
that are mounted by this component as those are not components. Use this#getMountedView
for that.public View getMountedView()
public Drawable getMountedDrawable()
public LithoView getLithoView()
public Rect getBoundsInLithoView()
LithoView
.public Rect getBounds()
public java.lang.String getTestKey()
public java.lang.String getComponentTestKey()
Unlike getTestKey()
, this function can return a test key set on any Component,
including container Components which resolve into LayoutNodes.
public java.lang.Object getComponentTag()
public java.lang.String getTextContent()
public ComponentHost getComponentHost()
ComponentHost
that wraps this component or null if one cannot be found.public java.lang.String getKey()
public Component getComponent()
public Drawable getForeground()
public Drawable getBackground()
public java.lang.Integer getImportantForAccessibility()
public boolean getFocusable()
public java.lang.CharSequence getContentDescription()
public StateContainer getStateContainer()
public java.lang.String getId()
public EventHandler getClickHandler()
public java.lang.String toString()
toString
in class java.lang.Object