Add YogaNode.create()

Summary:
Adds a factory method to `YogaNode`.

While this is purely redundant at the moment, it will allow experimentation in follow-up diffs. We will have concrete implementations deriving from `YogaNode` (which will be abstract).

Going through `YogaNode.create()` means that we can maintain ABI compatibility.

Reviewed By: amir-shalem

Differential Revision: D14122974

fbshipit-source-id: 15d92f296d91cc8bbd79a196f370d2dbb69b3f92
This commit is contained in:
David Aurelio
2019-02-18 03:03:29 -08:00
committed by Facebook Github Bot
parent 61ae484316
commit 5a6d84abc9

View File

@@ -795,4 +795,12 @@ public class YogaNode implements Cloneable {
newNode.mOwner = this; newNode.mOwner = this;
return newNode.mNativePointer; return newNode.mNativePointer;
} }
public static YogaNode create() {
return new YogaNode();
}
public static YogaNode create(YogaConfig config) {
return new YogaNode(config);
}
} }