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:
committed by
Facebook Github Bot
parent
61ae484316
commit
5a6d84abc9
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user