|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.compoze.collab.util.ObjectUtility
public class ObjectUtility
Utility methods useful for objects and reflection.
| Method Summary | |
|---|---|
static boolean |
isClassInstanceOf(Class clazz1,
Class clazz2)
Determines if objects of a given class are instances of objects of another class. |
static Object |
newInstance(String sClass)
Gets a new instance of a class using the default constructor. |
static Object |
newInstance(String sClass,
Class[] parameterTypes,
Object[] initArgs)
Gets a new instance of a class using a constructor that takes the given paremters. |
static boolean |
objectsAreEqual(Object obj1,
Object obj2)
Determines if two objects are equal (allowing for null objects). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isClassInstanceOf(Class clazz1,
Class clazz2)
clazz1 - the superclass (not null)clazz2 - the class to test (not null)
public static Object newInstance(String sClass)
throws ClassNotFoundException,
NoSuchMethodException,
InstantiationException,
IllegalAccessException,
InvocationTargetException
sClass - the fully qualified class name (not
null)
null)
ClassNotFoundException
NoSuchMethodException
InstantiationException
IllegalAccessException
InvocationTargetException
public static Object newInstance(String sClass,
Class[] parameterTypes,
Object[] initArgs)
throws ClassNotFoundException,
NoSuchMethodException,
InstantiationException,
IllegalAccessException,
InvocationTargetException
sClass - the fully qualified class name (not
null)parameterTypes - the parameters that the constructor
takes.initArgs - the objects to use when creating
an instance with the specified constructor.
sClass.
ClassNotFoundException
NoSuchMethodException
InstantiationException
IllegalAccessException
InvocationTargetException
public static boolean objectsAreEqual(Object obj1,
Object obj2)
null or obj1.equals(obj2)
is true.
obj1 - the first object (may be null)obj2 - the second object (may be null)
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||