Detect if given Component is LithoComponent

Summary: Useful for next diffs: enables to detect whether we have LithoComponent or CKComponent

Reviewed By: adityasharat

Differential Revision: D23128972

fbshipit-source-id: b9aef358c1426df4f05213c42e43402e8cae984f
This commit is contained in:
Dominik Wielgórski
2020-08-17 10:18:07 -07:00
committed by Facebook GitHub Bot
parent 26b54ece5a
commit 939ed27aad
4 changed files with 22 additions and 3 deletions

View File

@@ -332,7 +332,12 @@ public class DebugComponentDescriptor extends NodeDescriptor<DebugComponent> {
// doesn't add linked node descriptor
}
}
extraInfo.put("className", node.getComponent().getClass().getName());
final FlipperObject.Builder metaData = new FlipperObject.Builder();
metaData.put("className", node.getComponent().getClass().getName());
metaData.put("framework", "LITHO");
extraInfo.put("metaData", metaData);
return extraInfo.build();
}

View File

@@ -110,7 +110,13 @@ public class DebugSectionDescriptor extends NodeDescriptor<DebugSection> {
@Override
public FlipperObject getExtraInfo(DebugSection node) {
FlipperObject.Builder extraInfo = new FlipperObject.Builder();
extraInfo.put("className", node.getSection().getClass().getName());
final FlipperObject.Builder metaData = new FlipperObject.Builder();
metaData.put("className", node.getSection().getClass().getName());
metaData.put("framework", "LITHO");
extraInfo.put("metaData", metaData);
return extraInfo.build();
}