Package com.google.j2objc.annotations
Enum ObjectiveCAdapterMethod.Adaptation
java.lang.Object
java.lang.Enum<ObjectiveCAdapterMethod.Adaptation>
com.google.j2objc.annotations.ObjectiveCAdapterMethod.Adaptation
- All Implemented Interfaces:
Serializable
,Comparable<ObjectiveCAdapterMethod.Adaptation>
,java.lang.constant.Constable
- Enclosing class:
ObjectiveCAdapterMethod
public static enum ObjectiveCAdapterMethod.Adaptation
extends Enum<ObjectiveCAdapterMethod.Adaptation>
Specific adaptations applied by the annotation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionJava boolean arguments are converted to Objective C BOOL types (including handling OBJC_BOOL_IS_BOOL differences).Java enumeration argument values are converted from their NS_ENUM equivalent.Catch Java exceptions inside the adapter method and convert those exceptions to simple NSErrors (see JreExceptionAdapters).Java return values annotated with ObjectiveCAdapterProtocol are replaced with the protocol specified by ObjectiveCAdapterProtocol.Java return values of java.util.List are returned as NSArrays.Java returned booleans are converted to Objective C BOOL types (including handling OBJC_BOOL_IS_BOOL differences).Java enumeration return values are converted to the NS_ENUM equivalent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static ObjectiveCAdapterMethod.Adaptation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EXCEPTIONS_AS_ERRORS
Catch Java exceptions inside the adapter method and convert those exceptions to simple NSErrors (see JreExceptionAdapters). The supplied selector must have an "...error:" or "...WithError:" final argument following Objective-C naming conventions. If the original method returns void, the adapter method will return a BOOL success value. -
RETURN_NATIVE_BOOLS
Java returned booleans are converted to Objective C BOOL types (including handling OBJC_BOOL_IS_BOOL differences). -
ACCEPT_NATIVE_BOOLS
Java boolean arguments are converted to Objective C BOOL types (including handling OBJC_BOOL_IS_BOOL differences). -
RETURN_NATIVE_ENUMS
Java enumeration return values are converted to the NS_ENUM equivalent. This occurs at the outer-level only, Java enums within other types (container types, for example) are not supported. -
ACCEPT_NATIVE_ENUMS
Java enumeration argument values are converted from their NS_ENUM equivalent. This occurs at the outer-level only, Java enums within other types (container types, for example) are not supported. -
RETURN_ADAPTER_PROTOCOLS
Java return values annotated with ObjectiveCAdapterProtocol are replaced with the protocol specified by ObjectiveCAdapterProtocol. This substitution occurs even within type parameters of the return value. -
RETURN_LISTS_AS_NATIVE_ARRAYS
Java return values of java.util.List are returned as NSArrays. The resulting array follows Objective C expectations, the array is immutable, but the elements of the array may be mutable (not a deep copy). Array content type information (generics) is maintained.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-