Mark model fields final

Reviewed By: emilsjolander

Differential Revision: D6759564

fbshipit-source-id: 810dc8a9730fb330760d2aedecafcea81cf25cb1
This commit is contained in:
Pascal Hartig 2018-01-22 02:48:53 -08:00 committed by Facebook Github Bot
parent f49f7932d5
commit ff2658c3de
17 changed files with 23 additions and 21 deletions

View File

@ -22,7 +22,7 @@ public enum YogaAlign {
SPACE_BETWEEN(6),
SPACE_AROUND(7);
private int mIntValue;
private final int mIntValue;
YogaAlign(int intValue) {
mIntValue = intValue;

View File

@ -16,7 +16,7 @@ public enum YogaDimension {
WIDTH(0),
HEIGHT(1);
private int mIntValue;
private final int mIntValue;
YogaDimension(int intValue) {
mIntValue = intValue;

View File

@ -17,7 +17,7 @@ public enum YogaDirection {
LTR(1),
RTL(2);
private int mIntValue;
private final int mIntValue;
YogaDirection(int intValue) {
mIntValue = intValue;

View File

@ -16,7 +16,7 @@ public enum YogaDisplay {
FLEX(0),
NONE(1);
private int mIntValue;
private final int mIntValue;
YogaDisplay(int intValue) {
mIntValue = intValue;

View File

@ -23,7 +23,7 @@ public enum YogaEdge {
VERTICAL(7),
ALL(8);
private int mIntValue;
private final int mIntValue;
YogaEdge(int intValue) {
mIntValue = intValue;

View File

@ -15,7 +15,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
public enum YogaExperimentalFeature {
WEB_FLEX_BASIS(0);
private int mIntValue;
private final int mIntValue;
YogaExperimentalFeature(int intValue) {
mIntValue = intValue;

View File

@ -18,7 +18,7 @@ public enum YogaFlexDirection {
ROW(2),
ROW_REVERSE(3);
private int mIntValue;
private final int mIntValue;
YogaFlexDirection(int intValue) {
mIntValue = intValue;

View File

@ -20,7 +20,7 @@ public enum YogaJustify {
SPACE_AROUND(4),
SPACE_EVENLY(5);
private int mIntValue;
private final int mIntValue;
YogaJustify(int intValue) {
mIntValue = intValue;

View File

@ -20,7 +20,7 @@ public enum YogaLogLevel {
VERBOSE(4),
FATAL(5);
private int mIntValue;
private final int mIntValue;
YogaLogLevel(int intValue) {
mIntValue = intValue;

View File

@ -17,7 +17,7 @@ public enum YogaMeasureMode {
EXACTLY(1),
AT_MOST(2);
private int mIntValue;
private final int mIntValue;
YogaMeasureMode(int intValue) {
mIntValue = intValue;

View File

@ -33,13 +33,13 @@ public class YogaNode {
private List<YogaNode> mChildren;
private YogaMeasureFunction mMeasureFunction;
private YogaBaselineFunction mBaselineFunction;
private long mNativePointer;
private final long mNativePointer;
private Object mData;
/* Those flags needs be in sync with YGJNI.cpp */
private final static int MARGIN = 1;
private final static int PADDING = 2;
private final static int BORDER = 4;
private static final int MARGIN = 1;
private static final int PADDING = 2;
private static final int BORDER = 4;
@DoNotStrip
private int mEdgeSetFlag = 0;
@ -100,6 +100,7 @@ public class YogaNode {
}
private native void jni_YGNodeFree(long nativePointer);
@Override
protected void finalize() throws Throwable {
try {
jni_YGNodeFree(mNativePointer);
@ -170,7 +171,8 @@ public class YogaNode {
return child;
}
public @Nullable
@Nullable
public
YogaNode getParent() {
return mParent;
}

View File

@ -16,7 +16,7 @@ public enum YogaNodeType {
DEFAULT(0),
TEXT(1);
private int mIntValue;
private final int mIntValue;
YogaNodeType(int intValue) {
mIntValue = intValue;

View File

@ -17,7 +17,7 @@ public enum YogaOverflow {
HIDDEN(1),
SCROLL(2);
private int mIntValue;
private final int mIntValue;
YogaOverflow(int intValue) {
mIntValue = intValue;

View File

@ -16,7 +16,7 @@ public enum YogaPositionType {
RELATIVE(0),
ABSOLUTE(1);
private int mIntValue;
private final int mIntValue;
YogaPositionType(int intValue) {
mIntValue = intValue;

View File

@ -17,7 +17,7 @@ public enum YogaPrintOptions {
STYLE(2),
CHILDREN(4);
private int mIntValue;
private final int mIntValue;
YogaPrintOptions(int intValue) {
mIntValue = intValue;

View File

@ -18,7 +18,7 @@ public enum YogaUnit {
PERCENT(2),
AUTO(3);
private int mIntValue;
private final int mIntValue;
YogaUnit(int intValue) {
mIntValue = intValue;

View File

@ -17,7 +17,7 @@ public enum YogaWrap {
WRAP(1),
WRAP_REVERSE(2);
private int mIntValue;
private final int mIntValue;
YogaWrap(int intValue) {
mIntValue = intValue;