org.exolab.castor.builder

Class FactoryState

Implemented Interfaces:
ClassInfoResolver

(package private) class FactoryState
extends java.lang.Object
implements ClassInfoResolver

A class used to save State information for the SourceFactory
Author:
Keith Visco

Field Summary

(package private) ClassInfo
classInfo
(package private) JClass
jClass
(package private) String
packageName

Constructor Summary

FactoryState(String className, SGStateInfo sgState, String packageName)
Creates a new FactoryState

Method Summary

void
bindReference(Object key, ClassInfo classInfo)
Adds the given Reference to this ClassInfo resolver
(package private) FactoryState
getParent()
Returns the parent of this FactoryState.
(package private) SGStateInfo
getSGStateInfo()
Returns the SGStateInfo
(package private) boolean
hasBoundProperties()
Returns true if any bound properties have been found
(package private) boolean
isCreateGroupItem()
Returns true if we are currently in the state of creating a group item class.
(package private) void
markAsProcessed(Annotated annotated)
Marks the given Annotated XML Schema structure as having been processed.
(package private) 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
(package private) void
setBoundProperties(boolean bound)
Allows setting the bound properties flag
(package private) void
setCreateGroupItem(boolean createGroupItem)
Sets to true if we are currently generating a class to represent items in a group.
(package private) void
setParent(FactoryState parent)
Sets the parent of this FactoryState

Field Details

classInfo

(package private)  ClassInfo classInfo

jClass

(package private)  JClass jClass

packageName

(package private)  String packageName

Constructor Details

FactoryState

protected FactoryState(String className,
                       SGStateInfo sgState,
                       String packageName)
Creates a new FactoryState

Method Details

bindReference

public void bindReference(Object key,
                          ClassInfo classInfo)
Adds the given Reference to this ClassInfo resolver
Specified by:
bindReference in interface ClassInfoResolver
Parameters:
key - the key to bind a reference to
classInfo - the ClassInfo which is being referenced

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.
Returns:
the parent of this FactoryState.

getSGStateInfo

(package private)  SGStateInfo getSGStateInfo()
Returns the SGStateInfo
Returns:
the SGStateInfo

hasBoundProperties

(package private)  boolean hasBoundProperties()
Returns true if any bound properties have been found
Returns:
true if any bound properties have been found

isCreateGroupItem

(package private)  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

(package private)  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

(package private)  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

resolve

public ClassInfo resolve(Object key)
Returns the ClassInfo which has been bound to the given key
Specified by:
resolve in interface ClassInfoResolver
Parameters:
key - the object to which the ClassInfo has been bound
Returns:
the ClassInfo which has been bound to the given key

setBoundProperties

(package private)  void setBoundProperties(boolean bound)
Allows setting the bound properties flag
Parameters:
bound - the new value of the bound properties flag

setCreateGroupItem

(package private)  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

(package private)  void setParent(FactoryState parent)
Sets the parent of this FactoryState
Parameters:
parent - the parent FactoryState
See Also:
getParent()

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