Module io.helidon.media.common
Package io.helidon.media.common
Enum MessageBodyOperator.PredicateResult
- java.lang.Object
-
- java.lang.Enum<MessageBodyOperator.PredicateResult>
-
- io.helidon.media.common.MessageBodyOperator.PredicateResult
-
- All Implemented Interfaces:
Serializable
,Comparable<MessageBodyOperator.PredicateResult>
- Enclosing interface:
- MessageBodyOperator<T extends MessageBodyContext>
public static enum MessageBodyOperator.PredicateResult extends Enum<MessageBodyOperator.PredicateResult>
Status whether requested class type is supported by the operator.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPATIBLE
Requested type is compatible with this operator, but it is not exact match.NOT_SUPPORTED
Requested type not supported.SUPPORTED
Requested type is supported by that specific operator.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageBodyOperator.PredicateResult
supports(Class<?> expected, GenericType<?> actual)
Whether handled class is supported.static MessageBodyOperator.PredicateResult
valueOf(String name)
Returns the enum constant of this type with the specified name.static MessageBodyOperator.PredicateResult[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_SUPPORTED
public static final MessageBodyOperator.PredicateResult NOT_SUPPORTED
Requested type not supported.
-
COMPATIBLE
public static final MessageBodyOperator.PredicateResult COMPATIBLE
Requested type is compatible with this operator, but it is not exact match.
-
SUPPORTED
public static final MessageBodyOperator.PredicateResult SUPPORTED
Requested type is supported by that specific operator.
-
-
Method Detail
-
values
public static MessageBodyOperator.PredicateResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MessageBodyOperator.PredicateResult c : MessageBodyOperator.PredicateResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageBodyOperator.PredicateResult valueOf(String name)
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
-
supports
public static MessageBodyOperator.PredicateResult supports(Class<?> expected, GenericType<?> actual)
Whether handled class is supported. MethodClass.isAssignableFrom(Class)
is invoked to verify if class under expected parameter is supported by by the class under actual parameter.- Parameters:
expected
- expected typeactual
- actual type- Returns:
- if supported or not
-
-