info.magnolia.objectfactory
Class Classes

java.lang.Object
  extended by info.magnolia.objectfactory.Classes

public class Classes
extends Object

Entry point to the currently configured ClassFactory.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph
See Also:
ClassFactory

Nested Class Summary
protected static class Classes.ClassFactoryProvider
          ClassFactoryProvider is used to hide the "swapability" of ClassFactory.
 
Constructor Summary
Classes()
           
 
Method Summary
static ClassFactory getClassFactory()
           
static
<T> T
newInstance(String className, Object... params)
          Convenience/shortcut method for instantiating new classes.
static
<T> T
quietNewInstance(String className, Object... params)
          Convenience/shortcut for newInstance(String, Object...), returning null both in case of a ClassNotFoundException or if the class could not be instantiated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Classes

public Classes()
Method Detail

newInstance

public static <T> T newInstance(String className,
                                Object... params)
                     throws ClassNotFoundException
Convenience/shortcut method for instantiating new classes.

Throws:
ClassNotFoundException
MgnlInstantiationException
See Also:
ClassFactory, getClassFactory()

quietNewInstance

public static <T> T quietNewInstance(String className,
                                     Object... params)
Convenience/shortcut for newInstance(String, Object...), returning null both in case of a ClassNotFoundException or if the class could not be instantiated. (which could be related to the parameters, etc)


getClassFactory

public static ClassFactory getClassFactory()


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.