Mark model fields final
Summary: These are already considered immutable, but not marked in their class. Reviewed By: emilsjolander Differential Revision: D6759564 fbshipit-source-id: 810dc8a9730fb330760d2aedecafcea81cf25cb1
This commit is contained in:
committed by
Facebook Github Bot
parent
42778f687b
commit
80f8aa3c7e
@@ -22,7 +22,7 @@ public enum YogaAlign {
|
|||||||
SPACE_BETWEEN(6),
|
SPACE_BETWEEN(6),
|
||||||
SPACE_AROUND(7);
|
SPACE_AROUND(7);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaAlign(int intValue) {
|
YogaAlign(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -16,7 +16,7 @@ public enum YogaDimension {
|
|||||||
WIDTH(0),
|
WIDTH(0),
|
||||||
HEIGHT(1);
|
HEIGHT(1);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaDimension(int intValue) {
|
YogaDimension(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -17,7 +17,7 @@ public enum YogaDirection {
|
|||||||
LTR(1),
|
LTR(1),
|
||||||
RTL(2);
|
RTL(2);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaDirection(int intValue) {
|
YogaDirection(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -16,7 +16,7 @@ public enum YogaDisplay {
|
|||||||
FLEX(0),
|
FLEX(0),
|
||||||
NONE(1);
|
NONE(1);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaDisplay(int intValue) {
|
YogaDisplay(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -23,7 +23,7 @@ public enum YogaEdge {
|
|||||||
VERTICAL(7),
|
VERTICAL(7),
|
||||||
ALL(8);
|
ALL(8);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaEdge(int intValue) {
|
YogaEdge(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -15,7 +15,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
|||||||
public enum YogaExperimentalFeature {
|
public enum YogaExperimentalFeature {
|
||||||
WEB_FLEX_BASIS(0);
|
WEB_FLEX_BASIS(0);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaExperimentalFeature(int intValue) {
|
YogaExperimentalFeature(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -18,7 +18,7 @@ public enum YogaFlexDirection {
|
|||||||
ROW(2),
|
ROW(2),
|
||||||
ROW_REVERSE(3);
|
ROW_REVERSE(3);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaFlexDirection(int intValue) {
|
YogaFlexDirection(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -20,7 +20,7 @@ public enum YogaJustify {
|
|||||||
SPACE_AROUND(4),
|
SPACE_AROUND(4),
|
||||||
SPACE_EVENLY(5);
|
SPACE_EVENLY(5);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaJustify(int intValue) {
|
YogaJustify(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -20,7 +20,7 @@ public enum YogaLogLevel {
|
|||||||
VERBOSE(4),
|
VERBOSE(4),
|
||||||
FATAL(5);
|
FATAL(5);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaLogLevel(int intValue) {
|
YogaLogLevel(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -17,7 +17,7 @@ public enum YogaMeasureMode {
|
|||||||
EXACTLY(1),
|
EXACTLY(1),
|
||||||
AT_MOST(2);
|
AT_MOST(2);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaMeasureMode(int intValue) {
|
YogaMeasureMode(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -33,13 +33,13 @@ public class YogaNode {
|
|||||||
private List<YogaNode> mChildren;
|
private List<YogaNode> mChildren;
|
||||||
private YogaMeasureFunction mMeasureFunction;
|
private YogaMeasureFunction mMeasureFunction;
|
||||||
private YogaBaselineFunction mBaselineFunction;
|
private YogaBaselineFunction mBaselineFunction;
|
||||||
private long mNativePointer;
|
private final long mNativePointer;
|
||||||
private Object mData;
|
private Object mData;
|
||||||
|
|
||||||
/* Those flags needs be in sync with YGJNI.cpp */
|
/* Those flags needs be in sync with YGJNI.cpp */
|
||||||
private final static int MARGIN = 1;
|
private static final int MARGIN = 1;
|
||||||
private final static int PADDING = 2;
|
private static final int PADDING = 2;
|
||||||
private final static int BORDER = 4;
|
private static final int BORDER = 4;
|
||||||
|
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
private int mEdgeSetFlag = 0;
|
private int mEdgeSetFlag = 0;
|
||||||
@@ -100,6 +100,7 @@ public class YogaNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeFree(long nativePointer);
|
private native void jni_YGNodeFree(long nativePointer);
|
||||||
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
jni_YGNodeFree(mNativePointer);
|
jni_YGNodeFree(mNativePointer);
|
||||||
@@ -170,7 +171,8 @@ public class YogaNode {
|
|||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable
|
@Nullable
|
||||||
|
public
|
||||||
YogaNode getParent() {
|
YogaNode getParent() {
|
||||||
return mParent;
|
return mParent;
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ public enum YogaNodeType {
|
|||||||
DEFAULT(0),
|
DEFAULT(0),
|
||||||
TEXT(1);
|
TEXT(1);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaNodeType(int intValue) {
|
YogaNodeType(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -17,7 +17,7 @@ public enum YogaOverflow {
|
|||||||
HIDDEN(1),
|
HIDDEN(1),
|
||||||
SCROLL(2);
|
SCROLL(2);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaOverflow(int intValue) {
|
YogaOverflow(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -16,7 +16,7 @@ public enum YogaPositionType {
|
|||||||
RELATIVE(0),
|
RELATIVE(0),
|
||||||
ABSOLUTE(1);
|
ABSOLUTE(1);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaPositionType(int intValue) {
|
YogaPositionType(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -17,7 +17,7 @@ public enum YogaPrintOptions {
|
|||||||
STYLE(2),
|
STYLE(2),
|
||||||
CHILDREN(4);
|
CHILDREN(4);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaPrintOptions(int intValue) {
|
YogaPrintOptions(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -18,7 +18,7 @@ public enum YogaUnit {
|
|||||||
PERCENT(2),
|
PERCENT(2),
|
||||||
AUTO(3);
|
AUTO(3);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaUnit(int intValue) {
|
YogaUnit(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
@@ -17,7 +17,7 @@ public enum YogaWrap {
|
|||||||
WRAP(1),
|
WRAP(1),
|
||||||
WRAP_REVERSE(2);
|
WRAP_REVERSE(2);
|
||||||
|
|
||||||
private int mIntValue;
|
private final int mIntValue;
|
||||||
|
|
||||||
YogaWrap(int intValue) {
|
YogaWrap(int intValue) {
|
||||||
mIntValue = intValue;
|
mIntValue = intValue;
|
||||||
|
Reference in New Issue
Block a user