Rename isInternalComponent to canResolve

Summary:
I'm sure there's a better way to describe what this does in the Javadoc, but I
can't really come up with one.

Also inlined one method which made another call which is now redundant.

I'd also really like to make this call entirely unnecessary by moving the logic
to `resolve()` so that overriding it automatically implies `canResolve` but the
edge cases for commonProps and treeProps make this rather unpleasant.

Reviewed By: IanChilds

Differential Revision: D8476911

fbshipit-source-id: 33c6a20da03e50cd1c1d4994e64ef8b43b2c68bc
This commit is contained in:
Pascal Hartig
2018-06-18 07:25:19 -07:00
committed by Facebook Github Bot
parent 8b2a2b12a3
commit 16a3e2fa27

View File

@@ -18,7 +18,6 @@ import com.facebook.litho.ComponentContext;
import com.facebook.litho.ComponentLifecycle;
import com.facebook.litho.DebugComponent;
import com.facebook.litho.DebugLayoutNode;
import com.facebook.litho.EventHandler;
import com.facebook.litho.LithoView;
import com.facebook.litho.annotations.Prop;
import com.facebook.litho.annotations.State;
@@ -269,7 +268,7 @@ public class DebugComponentDescriptor extends NodeDescriptor<DebugComponent> {
@Nullable
private static SonarObject getPropData(DebugComponent node) {
if (node.isInternalComponent()) {
if (node.canResolve()) {
return null;
}
@@ -328,7 +327,7 @@ public class DebugComponentDescriptor extends NodeDescriptor<DebugComponent> {
@Nullable
private static SonarObject getStateData(DebugComponent node) {
if (node.isInternalComponent()) {
if (node.canResolve()) {
return null;
}