public final class DebugComponent extends Object
Component
or a ComponentLayout
. The purpose of this class is for tools such as Stetho's
UI inspector to be able to easily visualize a component hierarchy without worrying about
implementation details of Litho.Modifier and Type | Class and Description |
---|---|
static interface |
DebugComponent.Overrider |
Modifier and Type | Method and Description |
---|---|
boolean |
canResolve() |
Rect |
getBounds() |
Rect |
getBoundsInLithoView() |
List<DebugComponent> |
getChildComponents()
Get the list of components composed by this component.
|
Component |
getComponent() |
ComponentHost |
getComponentHost() |
ComponentContext |
getContext() |
String |
getGlobalKey() |
String |
getKey() |
DebugLayoutNode |
getLayoutNode() |
LithoView |
getLithoView() |
Drawable |
getMountedDrawable() |
View |
getMountedView() |
static DebugComponent |
getRootInstance(Component component) |
static DebugComponent |
getRootInstance(ComponentTree componentTree) |
static DebugComponent |
getRootInstance(LithoView view) |
ComponentLifecycle.StateContainer |
getStateContainer() |
String |
getTestKey() |
String |
getTextContent() |
boolean |
isLayoutNode() |
boolean |
isRoot() |
void |
rerender() |
void |
setOverrider(DebugComponent.Overrider overrider) |
@Nullable public static DebugComponent getRootInstance(Component component)
DebugComponent
of a LithoView. This should be the start of your
traversal.@Nullable public static DebugComponent getRootInstance(LithoView view)
@Nullable public static DebugComponent getRootInstance(@Nullable ComponentTree componentTree)
public void setOverrider(DebugComponent.Overrider overrider)
public List<DebugComponent> getChildComponents()
View
s
that are mounted by this component as those are not components.
Use this#getMountedView
for that.@Nullable public View getMountedView()
@Nullable public Drawable getMountedDrawable()
@Nullable public LithoView getLithoView()
public Rect getBoundsInLithoView()
LithoView
.public Rect getBounds()
public ComponentContext getContext()
ComponentContext
for this component.public boolean isLayoutNode()
@Nullable public String getTestKey()
@Nullable public String getTextContent()
@Nullable public ComponentHost getComponentHost()
ComponentHost
that wraps this component or null if one cannot be found.@Nullable public String getKey()
public Component getComponent()
@Nullable public DebugLayoutNode getLayoutNode()
public void rerender()
@Nullable public ComponentLifecycle.StateContainer getStateContainer()
public String getGlobalKey()
public boolean canResolve()
public boolean isRoot()