org.exolab.castor.builder
Class FactoryState

java.lang.Object
  extended byorg.exolab.castor.builder.FactoryState
All Implemented Interfaces:
ClassInfoResolver

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)  java.lang.String packageName
           
 
Constructor Summary
protected FactoryState(java.lang.String className, SGStateInfo sgState)
          Creates a new FactoryState
 
Method Summary
 void bindReference(java.lang.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(ComplexType complex)
          Marks the given complexType as having been processed.
(package private)  void markAsProcessed(ElementDecl element)
          Marks the given element as having been processed.
(package private)  void markAsProcessed(Group group)
          Marks the given Group as having been processed.
(package private)  boolean processed(ComplexType complex)
          Returns true if the given ComplexType has been marked as processed
(package private)  boolean processed(ElementDecl element)
          Returns true if the given Element has been marked as processed
(package private)  boolean processed(Group group)
          Returns true if the given Group has been marked as processed
 ClassInfo resolve(java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jClass

JClass jClass

classInfo

ClassInfo classInfo

packageName

java.lang.String packageName
Constructor Detail

FactoryState

protected FactoryState(java.lang.String className,
                       SGStateInfo sgState)
Creates a new FactoryState

Method Detail

bindReference

public void bindReference(java.lang.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

getSGStateInfo

SGStateInfo getSGStateInfo()
Returns the SGStateInfo


markAsProcessed

void markAsProcessed(ElementDecl element)
Marks the given element as having been processed.


processed

boolean processed(ElementDecl element)
Returns true if the given Element has been marked as processed


markAsProcessed

void markAsProcessed(ComplexType complex)
Marks the given complexType as having been processed.


processed

boolean processed(ComplexType complex)
Returns true if the given ComplexType has been marked as processed


markAsProcessed

void markAsProcessed(Group group)
Marks the given Group as having been processed.

Parameters:
group - the Group to mark as having been processed.

processed

boolean processed(Group group)
Returns true if the given Group has been marked as processed

Parameters:
group - the Group to check for being marked as processed

hasBoundProperties

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

Returns:
true if any bound properties have been found

setBoundProperties

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

Parameters:
bound - the new value of the bound properties flag
See Also:
hasBoundProperties()

resolve

public ClassInfo resolve(java.lang.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

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.

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.

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.

setParent

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

Parameters:
parent - the parent FactoryState
See Also:
getParent()


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