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, as well as some additional utility methods for manipulating Class objects.

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 boolean isConcrete(Class<?> clazz)
           
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

isConcrete

public static boolean isConcrete(Class<?> clazz)

newInstance

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

Throws:
ClassNotFoundException
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-2014 Magnolia International Ltd.. All Rights Reserved.