Move UIManager annotations to separate package

Summary:
Moves ReactProp and ReactPropGroup to `com.facebook.react.uimanager.annotations`. This is needed
so that future annotation processor can run on code inside the com.facebook.react.uimanager package.

public

Reviewed By: astreet

Differential Revision: D2754842

fb-gh-sync-id: 3808c3e3f6c45e5897ecab88cd4175573c0c24e6
This commit is contained in:
Alexander Blom
2016-01-07 03:51:22 -08:00
committed by facebook-github-bot-4
parent 23cd9febbc
commit c1b7a369af
26 changed files with 38 additions and 32 deletions

View File

@@ -7,6 +7,7 @@ import android.os.Build;
import android.view.View;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.annotations.ReactProp;
/**
* Base class that should be suitable for the majority of subclasses of {@link ViewManager}.

View File

@@ -12,6 +12,8 @@ import com.facebook.csslayout.CSSFlexDirection;
import com.facebook.csslayout.CSSJustify;
import com.facebook.csslayout.CSSPositionType;
import com.facebook.csslayout.CSSWrap;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.annotations.ReactPropGroup;
/**
* Supply setters for base view layout properties such as width, height, flex properties,

View File

@@ -20,6 +20,8 @@ import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.touch.CatalystInterceptingViewGroup;
import com.facebook.react.touch.JSResponderHandler;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.annotations.ReactPropGroup;
/**
* Class responsible for knowing how to create and update catalyst Views of a given type. It is also

View File

@@ -15,6 +15,8 @@ import com.facebook.common.logging.FLog;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.annotations.ReactPropGroup;
/**
* This class is responsible for holding view manager property setters and is used in a process of

View File

@@ -1,6 +1,6 @@
// Copyright 2004-present Facebook. All Rights Reserved.
package com.facebook.react.uimanager;
package com.facebook.react.uimanager.annotations;
import javax.annotation.Nullable;
@@ -12,7 +12,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Use this annotation to annotate properties of native views that should be exposed to JS. This
* annotation should only be used for setter methods of subclasses of {@link ViewManager}.
* annotation should only be used for setter methods of subclasses of
* {@link com.facebook.react.uimanager.ViewManager}.
*
* Each annotated method should return {@code void} and take exactly two arguments: first being
* a view instance to be updated and second a value that should be set.
@@ -21,8 +22,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* - primitives (int, boolean, double, float)
* - {@link String}
* - {@link Boolean}
* - {@link ReadableArray}
* - {@link ReadableMap}
* - {@link com.facebook.react.bridge.ReadableArray}
* - {@link com.facebook.react.bridge.ReadableMap}
*
* When property gets removed from the corresponding component in React, annotated setter will be
* called with {@code null} in case of non-primitive value type or with a default value in case when

View File

@@ -1,6 +1,6 @@
// Copyright 2004-present Facebook. All Rights Reserved.
package com.facebook.react.uimanager;
package com.facebook.react.uimanager.annotations;
import javax.annotation.Nullable;
@@ -12,9 +12,10 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Use this annotation to annotate group of properties of native views that should be exposed to JS.
* This annotation should only be used for setter methods of subclasses of {@link ViewManager}. It's
* a batched version of {@link ReactProp} annotation (please see documentation of {@link ReactProp}
* for more details about how this annotation can be used).
* This annotation should only be used for setter methods of subclasses of
* {@link com.facebook.react.uimanager.ViewManager}. It's a batched version of {@link ReactProp}
* annotation (please see documentation of {@link ReactProp} for more details about how this
* annotation can be used).
*
* This annotation is meant to be used for a group of similar properties. That's why it support only
* a set of properties of the same type. A good example is supporting "border", where we have 7