Class FieldMemberAndAccessorFactory
java.lang.Object
org.exolab.castor.builder.factory.FieldMemberAndAccessorFactory
- Direct Known Subclasses:
CollectionMemberAndAccessorFactory
,IdentityMemberAndAccessorFactory
This factory takes a FieldInfo and generates the suitable JFields
(and optional the getter and setter methods) into the JClass.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a factory that offers public methods to create the field initialization code as well as the getter/setter methods. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createAccessMethods
(FieldInfo fieldInfo, JClass jClass, boolean useJava50, AnnotationBuilder[] annotationBuilders) Adds the getter/setter for this field to the jClass.final void
createJavaField
(FieldInfo fieldInfo, JClass jClass) Adds the suitable JField to the JClass.void
generateInitializerCode
(FieldInfo fieldInfo, JSourceCode jsc) Creates the field initialization code in a constructor.Returns the javaNaming.
-
Constructor Details
-
FieldMemberAndAccessorFactory
Creates a factory that offers public methods to create the field initialization code as well as the getter/setter methods.- Parameters:
naming
- JavaNaming to use
-
-
Method Details
-
generateInitializerCode
Creates the field initialization code in a constructor.- Parameters:
fieldInfo
- the fieldInfo to translatejsc
- the JSourceCode in which to add the source to
-
createJavaField
Adds the suitable JField to the JClass.- Parameters:
fieldInfo
- the fieldInfo to translatejClass
- the jclass the jField will be added to
-
createAccessMethods
public void createAccessMethods(FieldInfo fieldInfo, JClass jClass, boolean useJava50, AnnotationBuilder[] annotationBuilders) Adds the getter/setter for this field to the jClass.- Parameters:
fieldInfo
- the fieldInfo to translatejClass
- the jclass the jField will be added touseJava50
- java version flag
-
getJavaNaming
Returns the javaNaming.- Returns:
- the javaNaming instance
-