Class UnboxedField
java.lang.Object
com.sun.tools.xjc.generator.bean.field.UnboxedField
- All Implemented Interfaces:
FieldOutline
A required primitive property.
- Author:
- Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JCodeModelprotected final JTypeThe publicly visible type of this field.protected final JTypeThe type of this field, which can hold all the possible types.protected final ClassOutlineImplprotected final CPropertyInfo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUnboxedField(ClassOutlineImpl outline, CPropertyInfo prop) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidannotate(JAnnotatable field) Annotate the field according to the recipes given asCPropertyInfo.protected final JExpressionCase fromexposedTypetoimplTypeif necessary.create(JExpression targetObject) Creates a newFieldAccessorof this field for the specified object.protected final voidprotected final JFieldVargenerateField(JType type) Generates the field declaration.protected JTypeReturns the type used to store the value of the field in memory.protected StringGets the name of the getter method.protected final OptionsGets theOptionsin the current compilation context.final CPropertyInfoGets the corresponding model object.final JTypeGets the type of the "raw value".protected JTypeCompute the type of aCPropertyInfoReturns contents to be added to javadoc.final ClassOutlineparent()Gets the enclosingClassOutline.protected JFieldVarref()
-
Field Details
-
outline
-
prop
-
codeModel
-
implType
The type of this field, which can hold all the possible types. -
exposedType
The publicly visible type of this field. If we are generating value classes implType==exposedType.
-
-
Constructor Details
-
UnboxedField
-
-
Method Details
-
getType
Compute the type of aCPropertyInfo -
getFieldType
Returns the type used to store the value of the field in memory. -
create
Description copied from interface:FieldOutlineCreates a newFieldAccessorof this field for the specified object.- Parameters:
targetObject- Evaluates to an object, and the field on this object will be accessed.
-
createField
protected final void createField() -
getGetterMethod
Gets the name of the getter method.This encapsulation is necessary because sometimes we use
isXXXXas the method name. -
ref
-
getRawType
Description copied from interface:FieldOutlineGets the type of the "raw value".This type can represent the entire value of this field. For fields that can carry multiple values, this is an array.
This type allows the client of the outline to generate code to set/get values from a property.
-
parent
Description copied from interface:FieldOutlineGets the enclosingClassOutline.- Specified by:
parentin interfaceFieldOutline
-
getPropertyInfo
Description copied from interface:FieldOutlineGets the corresponding model object.- Specified by:
getPropertyInfoin interfaceFieldOutline
-
annotate
Annotate the field according to the recipes given asCPropertyInfo. -
getOptions
Gets theOptionsin the current compilation context. -
generateField
Generates the field declaration. -
castToImplType
Case fromexposedTypetoimplTypeif necessary. -
listPossibleTypes
Returns contents to be added to javadoc.
-