org.jcon.persistance
Class MetaTOFObjectFactory

java.lang.Object
  extended by org.jcon.persistance.UnserializingTOFObjectFactory
      extended by org.jcon.persistance.MetaTOFObjectFactory
All Implemented Interfaces:
TOFObjectFactory
Direct Known Subclasses:
LookupMappingMetaTOFObjectFactory

public class MetaTOFObjectFactory
extends UnserializingTOFObjectFactory

Builds a metastructure (so that objects aren't actually instantiated), useful for mangling TOFs when the classes/lookups might be missing or changed.

Author:
Paul Reavis

Field Summary
 
Fields inherited from class org.jcon.persistance.UnserializingTOFObjectFactory
fixPartnerSoft
 
Constructor Summary
MetaTOFObjectFactory()
           
 
Method Summary
 java.lang.Object buildClassLiteral(java.lang.String name)
          Returns the class name.
 java.lang.Object buildLookup(java.lang.Object classReference, java.lang.Object arg)
          Builds a LookupReference object.
 java.lang.Object createBean(java.lang.Object classLiteral)
          Creates a MetaBean object.
 void importClass(java.lang.Object classy)
          Imports a classname so that only the classname need be used to reference it in the remainder of the file.
 java.lang.Object importObject(java.lang.Object path)
          Imports an object from another place in the store (invalid if store is null)
 java.lang.Object importTextObject(java.lang.Object path)
          Imports a text object from another place in the store (invalid if store is null)
 void setBeanState(java.lang.Object bean, java.lang.Object state)
          Populates the MetaBean with properties.
 
Methods inherited from class org.jcon.persistance.UnserializingTOFObjectFactory
addToArrayList, addToMap, addToSet, buildBooleanLiteral, buildFloatLiteral, buildIntegerLiteral, buildNullLiteral, createArrayList, createMap, createSet, swizzle, unswizzle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaTOFObjectFactory

public MetaTOFObjectFactory()
Method Detail

importClass

public void importClass(java.lang.Object classy)
                 throws TOFException
Imports a classname so that only the classname need be used to reference it in the remainder of the file.

Specified by:
importClass in interface TOFObjectFactory
Overrides:
importClass in class UnserializingTOFObjectFactory
Throws:
TOFException

buildLookup

public java.lang.Object buildLookup(java.lang.Object classReference,
                                    java.lang.Object arg)
                             throws TOFException
Builds a LookupReference object.

Specified by:
buildLookup in interface TOFObjectFactory
Overrides:
buildLookup in class UnserializingTOFObjectFactory
Throws:
TOFException

buildClassLiteral

public java.lang.Object buildClassLiteral(java.lang.String name)
                                   throws TOFException
Returns the class name. Expands to full classname if already imported/referenced.

Specified by:
buildClassLiteral in interface TOFObjectFactory
Overrides:
buildClassLiteral in class UnserializingTOFObjectFactory
Throws:
TOFException

importObject

public java.lang.Object importObject(java.lang.Object path)
                              throws TOFException
Description copied from class: UnserializingTOFObjectFactory
Imports an object from another place in the store (invalid if store is null)

Specified by:
importObject in interface TOFObjectFactory
Overrides:
importObject in class UnserializingTOFObjectFactory
Throws:
TOFException

importTextObject

public java.lang.Object importTextObject(java.lang.Object path)
                                  throws TOFException
Description copied from class: UnserializingTOFObjectFactory
Imports a text object from another place in the store (invalid if store is null)

Specified by:
importTextObject in interface TOFObjectFactory
Overrides:
importTextObject in class UnserializingTOFObjectFactory
Throws:
TOFException

createBean

public java.lang.Object createBean(java.lang.Object classLiteral)
                            throws TOFException
Creates a MetaBean object.

Specified by:
createBean in interface TOFObjectFactory
Overrides:
createBean in class UnserializingTOFObjectFactory
Throws:
TOFException

setBeanState

public void setBeanState(java.lang.Object bean,
                         java.lang.Object state)
                  throws TOFException
Populates the MetaBean with properties.

Specified by:
setBeanState in interface TOFObjectFactory
Overrides:
setBeanState in class UnserializingTOFObjectFactory
Throws:
TOFException