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 Field
protected 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.int
getAlternativeIndex
(Object object) Given the choice value object, return the choice index.getAlternativeObject
(Object object) Given the choice value object, return the alternative object.boolean
Methods 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:ChoiceConverter
Given the choice index, and the alternative object, create the choice value object.- Specified by:
createAlternative
in classChoiceConverter
- Parameters:
index
- The choice indexalternativeObject
- The alternative object- Returns:
- The new choice value object
-
getAlternativeIndex
Description copied from class:ChoiceConverter
Given the choice value object, return the choice index.- Specified by:
getAlternativeIndex
in classChoiceConverter
- Parameters:
object
- The choice value object- Returns:
- The choice index
-
getAlternativeObject
Description copied from class:ChoiceConverter
Given the choice value object, return the alternative object.- Specified by:
getAlternativeObject
in classChoiceConverter
- Parameters:
object
- The choice value object- Returns:
- The alternative object
-
isAnonymous
public boolean isAnonymous()- Overrides:
isAnonymous
in classAsnConverter
-