Package org.asnlab.asndt.runtime.conv
Class AbstractChoiceConverter
java.lang.Object
org.asnlab.asndt.runtime.conv.AsnConverter
org.asnlab.asndt.runtime.conv.ChoiceConverter
org.asnlab.asndt.runtime.conv.AbstractChoiceConverter
- Direct Known Subclasses:
AnnotationChoiceConverter,ReflectionChoiceConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Field[]protected Method[]protected Fieldprotected Class<?>Fields inherited from class org.asnlab.asndt.runtime.conv.ChoiceConverter
alternativeConverters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAlternative(int index, Object alternativeObject) Given the choice index, and the alternative object, create the choice value object.intgetAlternativeIndex(Object object) Given the choice value object, return the choice index.getAlternativeObject(Object object) Given the choice value object, return the alternative object.booleanMethods inherited from class org.asnlab.asndt.runtime.conv.ChoiceConverter
getAlternativeConverter, setAlternativeConverters
-
Field Details
-
objectClass
-
choiceIdField
-
alternativeFields
-
alternativeMethods
-
-
Constructor Details
-
AbstractChoiceConverter
-
-
Method Details
-
createAlternative
Description copied from class:ChoiceConverterGiven the choice index, and the alternative object, create the choice value object.- Specified by:
createAlternativein classChoiceConverter- Parameters:
index- The choice indexalternativeObject- The alternative object- Returns:
- The new choice value object
-
getAlternativeIndex
Description copied from class:ChoiceConverterGiven the choice value object, return the choice index.- Specified by:
getAlternativeIndexin classChoiceConverter- Parameters:
object- The choice value object- Returns:
- The choice index
-
getAlternativeObject
Description copied from class:ChoiceConverterGiven the choice value object, return the alternative object.- Specified by:
getAlternativeObjectin classChoiceConverter- Parameters:
object- The choice value object- Returns:
- The alternative object
-
isAnonymous
public boolean isAnonymous()- Overrides:
isAnonymousin classAsnConverter
-