org.oddjob.values.types
Class MagicBeanType

java.lang.Object
  extended by org.oddjob.values.types.MagicBeanType
All Implemented Interfaces:
ArooaValue, ArooaSessionAware, ValueFactory<Object>

public class MagicBeanType
extends Object
implements ValueFactory<Object>, ArooaSessionAware

Create an on the fly bean. Useful for testing. See also MagicClassType and MagicBeanDescriptorFactory.

Author:
rob

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.oddjob.arooa.types.ValueFactory
ValueFactory.Conversions
 
Constructor Summary
MagicBeanType()
           
 
Method Summary
 ArooaClass getMagicClass()
           
 ArooaValue getProperties(String name)
           
 void setArooaSession(ArooaSession session)
           
 void setMagicClass(ArooaClass magicClass)
           
 void setProperties(String name, ArooaValue value)
           
 Object toValue()
          Provide an instance of the type this is a factory for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MagicBeanType

public MagicBeanType()
Method Detail

setArooaSession

public void setArooaSession(ArooaSession session)
Specified by:
setArooaSession in interface ArooaSessionAware

toValue

public Object toValue()
               throws ArooaConversionException
Description copied from interface: ValueFactory
Provide an instance of the type this is a factory for.

Specified by:
toValue in interface ValueFactory<Object>
Returns:
An instance of the type. May be null.
Throws:
ArooaConversionException - If unable to provide a value.

getMagicClass

public ArooaClass getMagicClass()

setMagicClass

public void setMagicClass(ArooaClass magicClass)

setProperties

public void setProperties(String name,
                          ArooaValue value)

getProperties

public ArooaValue getProperties(String name)