本文整理匯總了Java中com.facebook.react.uimanager.annotations.ReactProp.defaultFloat方法的典型用法代碼示例。如果您正苦於以下問題:Java ReactProp.defaultFloat方法的具體用法?Java ReactProp.defaultFloat怎麽用?Java ReactProp.defaultFloat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.react.uimanager.annotations.ReactProp
的用法示例。
在下文中一共展示了ReactProp.defaultFloat方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createPropSetter
import com.facebook.react.uimanager.annotations.ReactProp; //導入方法依賴的package包/類
private static PropSetter createPropSetter(
ReactProp annotation,
Method method,
Class<?> propTypeClass) {
if (propTypeClass == Dynamic.class) {
return new DynamicPropSetter(annotation, method);
} else if (propTypeClass == boolean.class) {
return new BooleanPropSetter(annotation, method, annotation.defaultBoolean());
} else if (propTypeClass == int.class) {
return new IntPropSetter(annotation, method, annotation.defaultInt());
} else if (propTypeClass == float.class) {
return new FloatPropSetter(annotation, method, annotation.defaultFloat());
} else if (propTypeClass == double.class) {
return new DoublePropSetter(annotation, method, annotation.defaultDouble());
} else if (propTypeClass == String.class) {
return new StringPropSetter(annotation, method);
} else if (propTypeClass == Boolean.class) {
return new BoxedBooleanPropSetter(annotation, method);
} else if (propTypeClass == Integer.class) {
return new BoxedIntPropSetter(annotation, method);
} else if (propTypeClass == ReadableArray.class) {
return new ArrayPropSetter(annotation, method);
} else if (propTypeClass == ReadableMap.class) {
return new MapPropSetter(annotation, method);
} else {
throw new RuntimeException("Unrecognized type: " + propTypeClass + " for method: " +
method.getDeclaringClass().getName() + "#" + method.getName());
}
}