org.exolab.castor.builder
Class FactoryState
java.lang.Object
org.exolab.castor.builder.FactoryState
- ClassInfoResolver
public class FactoryState
extends java.lang.Object
A class used to save State information for the SourceFactory.
FactoryState
public FactoryState(String className,
SGStateInfo sgState,
String packageName,
XMLBindingComponent component)
Constructs a new FactoryState.
className
- Class name of the class currently being generated.sgState
- Source Generator State objectpackageName
- package name for generated code.component
- TODO
FactoryState
public FactoryState(String className,
SGStateInfo sgState,
String packageName,
XMLBindingComponent component,
boolean enumeration)
Constructs a factory state with the option of choosing between JClass and JEnum.
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 JClass
bindReference
public void bindReference(Object key,
ClassInfo classInfoRef)
Adds the given Reference to this ClassInfo resolver.
- bindReference in interface ClassInfoResolver
key
- the key to bind a reference toclassInfoRef
- the ClassInfo which is being referenced
getClassInfo
public final ClassInfo getClassInfo()
Get ClassInfo for _jClass
.
getFieldInfoForChoice
public final FieldInfo getFieldInfoForChoice()
Get FieldInfo used to handle xsd:choice
.
- FieldInfo used to handle
xsd:choice
.
getJClass
public final JClass getJClass()
Get JClass for which we are currently generating code.
- JClass for which we are currently generating code.
getPackageName
public final String getPackageName()
Get package for the class currently being generated.
- Package for the class currently being generated.
getParent
(package private) FactoryState getParent()
Returns the parent of this FactoryState. The parent of a factory state is
the previous item of the list that contained all the created factory
states.
- the parent of this FactoryState.
getSGStateInfo
public SGStateInfo getSGStateInfo()
Returns the SGStateInfo.
hasBoundProperties
public boolean hasBoundProperties()
Returns true if any bound properties have been found.
- true if any bound properties have been found.
isCreateGroupItem
public boolean isCreateGroupItem()
Returns true if we are currently in the state of creating a group item
class.
- true if we are currently in the state of creating a group item
class.
markAsProcessed
public void markAsProcessed(Annotated annotated)
Marks the given Annotated XML Schema structure as having been processed.
annotated
- the Annotated XML Schema structure to mark as having been
processed.
processed
public boolean processed(Annotated annotated)
Returns true if the given Annotated XML Schema structure has been marked
as processed.
annotated
- the Annotated XML Schema structure to check for being marked
as processed
- true if the given Annotated XML Schema structure has been marked
as processed
resolve
public ClassInfo resolve(Object key)
Returns the ClassInfo which has been bound to the given key.
- resolve in interface ClassInfoResolver
key
- the object to which the ClassInfo has been bound
- the ClassInfo which has been bound to the given key
setBoundProperties
public void setBoundProperties(boolean bound)
Allows setting the bound properties flag.
bound
- the new value of the bound properties flag
setCreateGroupItem
public void setCreateGroupItem(boolean createGroupItem)
Sets to true if we are currently generating a class to represent items in
a group.
createGroupItem
- true if we are currently generating a class to represent items
in a group.
setFieldInfoForChoice
public final void setFieldInfoForChoice(FieldInfo fieldInfoForChoice)
Set FieldInfo used to handle xsd:choice
.
fieldInfoForChoice
- FieldInfo used to handle xsd:choice
.
setParent
public void setParent(FactoryState parent)
Sets the parent of this FactoryState.
parent
- the parent FactoryState
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com