com.arsdigita.util
Class Classes

java.lang.Object
  extended bycom.arsdigita.util.Classes

public final class Classes
extends Object

A collection of static utility methods for dealing with Java classes.

Author:
Justin Ross

Field Summary
static String versionId
           
 
Constructor Summary
Classes()
           
 
Method Summary
static Class loadClass(String clacc)
          Loads a class from its fully qualified string name.
static Object newInstance(Class clacc)
          Creates a new instance of clacc using its no-args constructor.
static Object newInstance(Class clacc, Class[] params, Object[] values)
          Constructs a new instance of a class using the given parameters.
static Object newInstance(String clacc)
          Creates a new instance of the class represented by clacc using its no-args constructor.
static Object newInstance(String clacc, Class[] params, Object[] values)
          Constructs a new instance of the class referred to by clacc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

Classes

public Classes()
Method Detail

loadClass

public static final Class loadClass(String clacc)
Loads a class from its fully qualified string name.

Parameters:
clacc - A fully qualified String naming the class to be loaded

newInstance

public static final Object newInstance(Class clacc,
                                       Class[] params,
                                       Object[] values)
Constructs a new instance of a class using the given parameters.

Parameters:
clacc - The Class of which to make a new instance
params - A Class[] representing the arguments of the desired constructor
values - An Object[] of values to fill the parameters

newInstance

public static final Object newInstance(String clacc,
                                       Class[] params,
                                       Object[] values)
Constructs a new instance of the class referred to by clacc.

Parameters:
clacc - The fully qualified String clacc of the object you wish to instantiate
params - A Class[] representing the arguments of the desired constructor
values - An Object[] of values to fill the parameters

newInstance

public static final Object newInstance(Class clacc)
Creates a new instance of clacc using its no-args constructor. If the class has no such constructor, it throws a runtime exception.

Parameters:
clacc - The class of which to create a new instance

newInstance

public static final Object newInstance(String clacc)
Creates a new instance of the class represented by clacc using its no-args constructor. If the class has no such constructor, it throws a runtime exception.

Parameters:
clacc - The fully-qualified String name of the class


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC