public class FactoryState extends Object implements ClassInfoResolver
Constructor and Description |
---|
FactoryState(String className,
SGStateInfo sgState,
String packageName,
XMLBindingComponent component)
Constructs a new FactoryState.
|
FactoryState(String className,
SGStateInfo sgState,
String packageName,
XMLBindingComponent component,
boolean enumeration)
Constructs a factory state with the option of choosing between JClass and JEnum.
|
Modifier and Type | Method and Description |
---|---|
void |
bindReference(Object key,
ClassInfo classInfoRef)
Adds the given Reference to this ClassInfo resolver.
|
ClassInfo |
getClassInfo()
Get ClassInfo for
_jClass . |
FieldInfo |
getFieldInfoForChoice()
Get FieldInfo used to handle
xsd:choice . |
JClass |
getJClass()
Get JClass for which we are currently generating code.
|
String |
getPackageName()
Get package for the class currently being generated.
|
SGStateInfo |
getSGStateInfo()
Returns the SGStateInfo.
|
boolean |
hasBoundProperties()
Returns true if any bound properties have been found.
|
boolean |
isCreateGroupItem()
Returns true if we are currently in the state of creating a group item
class.
|
void |
markAsProcessed(Annotated annotated)
Marks the given Annotated XML Schema structure as having been processed.
|
boolean |
processed(Annotated annotated)
Returns true if the given Annotated XML Schema structure has been marked
as processed.
|
ClassInfo |
resolve(Object key)
Returns the ClassInfo which has been bound to the given key.
|
void |
setBoundProperties(boolean bound)
Allows setting the bound properties flag.
|
void |
setCreateGroupItem(boolean createGroupItem)
Sets to true if we are currently generating a class to represent items in
a group.
|
void |
setFieldInfoForChoice(FieldInfo fieldInfoForChoice)
Set FieldInfo used to handle
xsd:choice . |
void |
setParent(FactoryState parent)
Sets the parent of this FactoryState.
|
public FactoryState(String className, SGStateInfo sgState, String packageName, XMLBindingComponent component)
className
- Class name of the class currently being generated.sgState
- Source Generator State objectpackageName
- package name for generated code.component
- TODOpublic FactoryState(String className, SGStateInfo sgState, String packageName, XMLBindingComponent component, boolean enumeration)
className
- Class name of the class currently being generated.sgState
- Source Generator State objectpackageName
- package name for generated code.component
- TODOenumeration
- use a JEnum instead if a JClasspublic final JClass getJClass()
public final ClassInfo getClassInfo()
_jClass
._jClass
.public final FieldInfo getFieldInfoForChoice()
xsd:choice
.xsd:choice
.public final void setFieldInfoForChoice(FieldInfo fieldInfoForChoice)
xsd:choice
.fieldInfoForChoice
- FieldInfo used to handle xsd:choice
.public final String getPackageName()
public void bindReference(Object key, ClassInfo classInfoRef)
bindReference
in interface ClassInfoResolver
key
- the key to bind a reference toclassInfoRef
- the ClassInfo which is being referencedpublic SGStateInfo getSGStateInfo()
public void markAsProcessed(Annotated annotated)
annotated
- the Annotated XML Schema structure to mark as having been
processed.public boolean processed(Annotated annotated)
annotated
- the Annotated XML Schema structure to check for being marked
as processedpublic boolean hasBoundProperties()
public void setBoundProperties(boolean bound)
bound
- the new value of the bound properties flaghasBoundProperties()
public ClassInfo resolve(Object key)
resolve
in interface ClassInfoResolver
key
- the object to which the ClassInfo has been boundpublic boolean isCreateGroupItem()
public void setCreateGroupItem(boolean createGroupItem)
createGroupItem
- true if we are currently generating a class to represent items
in a group.public void setParent(FactoryState parent)
parent
- the parent FactoryStategetParent()
Copyright © 2019. All rights reserved.