Class SinglePrimitiveAccessField
java.lang.Object
com.sun.tools.xjc.generator.bean.field.SingleField
com.sun.tools.xjc.generator.bean.field.SinglePrimitiveAccessField
- All Implemented Interfaces:
FieldOutline
SingleField
that forces the primitive accessor type.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.tools.xjc.generator.bean.field.SingleField
SingleField.Accessor
-
Field Summary
Modifier and TypeFieldDescriptionprotected final JCodeModel
protected final JType
The publicly visible type of this field.protected final JType
The type of this field, which can hold all the possible types.protected final ClassOutlineImpl
protected final CPropertyInfo
-
Constructor Summary
ModifierConstructorDescriptionprotected
SinglePrimitiveAccessField
(ClassOutlineImpl context, CPropertyInfo prop) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
annotate
(JAnnotatable field) Annotate the field according to the recipes given asCPropertyInfo
.protected final JExpression
Cast fromexposedType
toimplType
if necessary.protected final void
protected final JFieldVar
generateField
(JType type) Generates the field declaration.protected String
Gets the name of the getter method.protected final Options
Gets theOptions
in the current compilation context.final CPropertyInfo
Gets the corresponding model object.final JType
Gets the type of the "raw value".protected JType
Compute the type of aCPropertyInfo
Returns contents to be added to javadoc.final ClassOutline
parent()
Gets the enclosingClassOutline
.protected JFieldVar
ref()
Methods inherited from class com.sun.tools.xjc.generator.bean.field.SingleField
create, getFieldType
-
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
-
SinglePrimitiveAccessField
-
-
Method Details
-
createField
protected final void createField() -
getGetterMethod
Gets the name of the getter method.This encapsulation is necessary because sometimes we use
isXXXX
as the method name. -
ref
-
getRawType
Description copied from interface:FieldOutline
Gets 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:FieldOutline
Gets the enclosingClassOutline
.- Specified by:
parent
in interfaceFieldOutline
-
getPropertyInfo
Description copied from interface:FieldOutline
Gets the corresponding model object.- Specified by:
getPropertyInfo
in interfaceFieldOutline
-
annotate
Annotate the field according to the recipes given asCPropertyInfo
. -
getOptions
Gets theOptions
in the current compilation context. -
generateField
Generates the field declaration. -
castToImplType
Cast fromexposedType
toimplType
if necessary. -
getType
Compute the type of aCPropertyInfo
-
listPossibleTypes
Returns contents to be added to javadoc.
-