be.objectify.led
Class TypeFactoryRegistry

java.lang.Object
  extended by be.objectify.led.TypeFactoryRegistry

public class TypeFactoryRegistry
extends Object

Registry of TypeFactory for creating objects of the correct type based on the field.

Author:
Steve Chaloner

Constructor Summary
TypeFactoryRegistry()
           
 
Method Summary
 TypeFactory getFactory(Class clazz)
          Gets the type factory for the given class.
 void register(List<TypeFactory> typeFactories)
          Registers the type factories with the registry.
 void register(TypeFactory... typeFactories)
          Registers the type factories with the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFactoryRegistry

public TypeFactoryRegistry()
Method Detail

register

public void register(TypeFactory... typeFactories)
Registers the type factories with the registry.

Parameters:
typeFactories - the type factories. None of the factories can be null.

register

public void register(List<TypeFactory> typeFactories)
Registers the type factories with the registry.

Parameters:
typeFactories - the type factories to register. Must not be null; none of contents

getFactory

public TypeFactory getFactory(Class clazz)
Gets the type factory for the given class.

Parameters:
clazz - the class of the required object
Returns:
the type factory, or null if no factory is registered for the class


Copyright © 2010 Objectify. All Rights Reserved.