Package org.apache.juneau.marshall
Enum Class MarshalledAs
- All Implemented Interfaces:
Serializable,Comparable<MarshalledAs>,Constable
Specifies the marshalling strategy for a type annotated with
@Marshalled.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAuto-detect the marshalling strategy (default).Serialize usingObject.toString()and deserialize using afromString(String),valueOf(String), or single-String-argument constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic MarshalledAsReturns the enum constant of this class with the specified name.static MarshalledAs[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DETECT
Auto-detect the marshalling strategy (default).The marshalling engine inspects the type and selects the best strategy (bean, map, collection, string swap, etc.).
-
STRING
Serialize usingObject.toString()and deserialize using afromString(String),valueOf(String), or single-String-argument constructor.Replaces the common
MarshallingStringSwapuse case without requiring a separate swap class.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-