Add standalone factory classes which generate YogaNode + YogaConfig

Summary:
Add standalone factory classes which generate YogaNode + YogaConfig, later on it will allow us to separate the yoga interface and actual implementation buck targets (see D17266406)

We've done such breakage change previously in D14122974.

Reviewed By: SidharthGuglani

Differential Revision: D17258196

fbshipit-source-id: b12f1a0d23c3f82b14cee0731a1daf1c015ee32c
This commit is contained in:
Amir Shalem
2019-09-12 06:02:48 -07:00
committed by Facebook Github Bot
parent a08a57b33c
commit fde89b056d
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package com.facebook.yoga;
public abstract class YogaConfigFactory {
public static YogaConfig create() {
return new YogaConfig();
}
}

View File

@@ -0,0 +1,11 @@
package com.facebook.yoga;
public abstract class YogaNodeFactory {
public static YogaNode create() {
return new YogaNodeJNIFinalizer();
}
public static YogaNode create(YogaConfig config) {
return new YogaNodeJNIFinalizer(config);
}
}