org.exolab.castor.builder

Class FactoryState

class FactoryState extends Object implements ClassInfoResolver

A class used to save State information for the SourceFactory

Author: Keith Visco

Field Summary
ClassInfoclassInfo
FieldInfofieldInfoForChoice
JClassjClass
StringpackageName
Constructor Summary
protected FactoryState(String className, SGStateInfo sgState, String packageName)
Method Summary
voidbindReference(Object key, ClassInfo classInfoRef)
Adds the given Reference to this ClassInfo resolver.
FactoryStategetParent()
Returns the parent of this FactoryState.
SGStateInfogetSGStateInfo()
Returns the SGStateInfo.
booleanhasBoundProperties()
Returns true if any bound properties have been found.
booleanisCreateGroupItem()
Returns true if we are currently in the state of creating a group item class.
voidmarkAsProcessed(Annotated annotated)
Marks the given Annotated XML Schema structure as having been processed.
booleanprocessed(Annotated annotated)
Returns true if the given Annotated XML Schema structure has been marked as processed.
ClassInforesolve(Object key)
Returns the ClassInfo which has been bound to the given key
voidsetBoundProperties(boolean bound)
Allows setting the bound properties flag.
voidsetCreateGroupItem(boolean createGroupItem)
Sets to true if we are currently generating a class to represent items in a group.
voidsetParent(FactoryState parent)
Sets the parent of this FactoryState

Field Detail

classInfo

ClassInfo classInfo

fieldInfoForChoice

FieldInfo fieldInfoForChoice

jClass

JClass jClass

packageName

String packageName

Constructor Detail

FactoryState

protected FactoryState(String className, SGStateInfo sgState, String packageName)

Method Detail

bindReference

public void bindReference(Object key, ClassInfo classInfoRef)
Adds the given Reference to this ClassInfo resolver.

Parameters: key the key to bind a reference to classInfoRef the ClassInfo which is being referenced

getParent

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.

Returns: the parent of this FactoryState.

getSGStateInfo

SGStateInfo getSGStateInfo()
Returns the SGStateInfo.

Returns: the SGStateInfo.

hasBoundProperties

boolean hasBoundProperties()
Returns true if any bound properties have been found.

Returns: true if any bound properties have been found.

isCreateGroupItem

boolean isCreateGroupItem()
Returns true if we are currently in the state of creating a group item class.

Returns: true if we are currently in the state of creating a group item class.

markAsProcessed

void markAsProcessed(Annotated annotated)
Marks the given Annotated XML Schema structure as having been processed.

Parameters: annotated the Annotated XML Schema structure to mark as having been processed.

processed

boolean processed(Annotated annotated)
Returns true if the given Annotated XML Schema structure has been marked as processed.

Parameters: annotated the Annotated XML Schema structure to check for being marked as processed

Returns: 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

Parameters: key the object to which the ClassInfo has been bound

Returns: the ClassInfo which has been bound to the given key

setBoundProperties

void setBoundProperties(boolean bound)
Allows setting the bound properties flag.

Parameters: bound the new value of the bound properties flag

See Also: FactoryState

setCreateGroupItem

void setCreateGroupItem(boolean createGroupItem)
Sets to true if we are currently generating a class to represent items in a group.

Parameters: createGroupItem true if we are currently generating a class to represent items in a group.

setParent

void setParent(FactoryState parent)
Sets the parent of this FactoryState

Parameters: parent the parent FactoryState

See Also: FactoryState

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com