info.magnolia.objectfactory
Class Classes

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

public class Classes
extends java.lang.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(java.lang.String className, java.lang.Object... params)
          Convenience/shortcut method for instantiating new classes.
static
<T> T
quietNewInstance(java.lang.String className, java.lang.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(java.lang.String className,
                                java.lang.Object... params)
                     throws java.lang.ClassNotFoundException
Convenience/shortcut method for instantiating new classes.

Throws:
java.lang.ClassNotFoundException
MgnlInstantiationException
See Also:
ClassFactory, getClassFactory()

quietNewInstance

public static <T> T quietNewInstance(java.lang.String className,
                                     java.lang.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-2011 Magnolia International Ltd.. All Rights Reserved.