Rename init() -> reinit() to be more in line with what it now does

Summary: Rename init() -> reinit() to be more in line with what it now does as the initiall init is done when constructing the object.

Reviewed By: lucasr

Differential Revision: D3992811

fbshipit-source-id: 61a10acc873ec028b2789007a400d89e62cf31d6
This commit is contained in:
Emil Sjolander
2016-10-12 03:44:54 -07:00
committed by Facebook Github Bot
parent 23acf2156f
commit 41b64478c4
3 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
private Object mData;
public CSSNode() {
init();
reinit();
}
private void assertNativeInstance() {
@@ -47,7 +47,7 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
private native long jni_CSSNodeNew();
@Override
public void init() {
public void reinit() {
if (mNativePointer != 0) {
throw new IllegalStateException("Allready initialized node");
}

View File

@@ -89,6 +89,6 @@ public interface CSSNodeAPI<CSSNodeType extends CSSNodeAPI> {
void setOverflow(CSSOverflow overflow);
void setData(Object data);
Object getData();
void init();
void reinit();
void free();
}

View File

@@ -62,7 +62,7 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
private Object mData;
@Override
public void init() {
public void reinit() {
free();
}