|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) @Target(value=FIELD) public @interface MythParameterType
This annotation is used to define the data type of a response parameter.
The datatype specified with this annotation is used by IPropertyAware objects
to do the "string to object conversion" of their property values, when using the functions
IPropertyAware.getPropertyValueObject(Enum) and IPropertyAware.setPropertyValueObject(Enum, Object).
public interface IProgramInfo { public static enum Props { ... // REC_STATUS is of type ProgramRecordingStatus @MythParameterType(ProgramRecordingStatus.class) REC_STATUS, // REC_ID is of type Integer @MythParameterType(Integer.class) REC_ID, ... } ... }
EnumUtils class.String is assumed as datatype of the property.
// the following will return ProgramRecordingStatus.class Class clazz = EnumUtils.getEnumDataType(IProgramInfo.Props.REC_STATUS);
GenericEnumUtils.getEnumDataType(Enum),
IPropertyAware.getPropertyValueObject(Enum),
IPropertyAware.setPropertyValueObject(Enum, Object)| Optional Element Summary | |
|---|---|
Class<?> |
stringType
The type to use when the data type should be converted to a string. |
Class<?> |
value
|
public abstract Class<?> value
public abstract Class<?> stringType
E.g. if this is a Boolean type but the stringType is set to Integer
then true will be converted to 1.
EncodingUtils.encodeObject(java.lang.Class, org.jmythapi.protocol.ProtocolVersion, S, java.lang.Class, java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||