be.objectify.led.factory.object
Class EnumFactory

java.lang.Object
  extended by be.objectify.led.factory.object.AbstractObjectFactory<Enum>
      extended by be.objectify.led.factory.object.EnumFactory
All Implemented Interfaces:
ObjectFactory<Enum>

public class EnumFactory
extends AbstractObjectFactory<Enum>

Object factory for Enums.

Author:
Steve Chaloner

Constructor Summary
EnumFactory(Class<? extends Enum> clazz)
           
 
Method Summary
 Enum createObject(String propertyName, String propertyValue)
          Creates an object based on propertyValue.
 Class<Enum> getBoundClass()
          Gets the class type this factory produces objects for.
 
Methods inherited from class be.objectify.led.factory.object.AbstractObjectFactory
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumFactory

public EnumFactory(Class<? extends Enum> clazz)
Method Detail

createObject

public Enum createObject(String propertyName,
                         String propertyValue)
Creates an object based on propertyValue. If propertyValue is null or no object can be based on it, null should be returned.

propertyValue - the value of the property
Returns:
an object (probably) based on propertyValue, or null

getBoundClass

public Class<Enum> getBoundClass()
Gets the class type this factory produces objects for.

Returns:
the class type


Copyright © 2010 Objectify. All Rights Reserved.