Class DefaultObjectFactory

java.lang.Object
org.exoplatform.commons.serialization.api.factory.ObjectFactory<Object>
org.exoplatform.commons.serialization.api.factory.DefaultObjectFactory

public final class DefaultObjectFactory extends ObjectFactory<Object>
Version:
$Revision$
Author:
Julien Viet
  • Constructor Details

    • DefaultObjectFactory

      public DefaultObjectFactory()
  • Method Details

    • create

      public <S> S create(Class<S> type, Map<FieldModel<? super S,?>,?> state) throws CreateException
      Description copied from class: ObjectFactory
      Instantiate an object based on the provided type. The implementor should take care of configuring the state of the returned objet with the provided state map argument.
      Specified by:
      create in class ObjectFactory<Object>
      Type Parameters:
      S - the parameter type of the sub type of the base type
      Parameters:
      type - the type
      state - the state
      Returns:
      the S instance
      Throws:
      CreateException - anything wrong that happened during instance creation