public class ObjectType extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,Class<?>> |
classCache |
static String |
LANG_PACKAGE |
static String |
module |
static String |
SQL_PACKAGE |
| Constructor and Description |
|---|
ObjectType() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
doRealCompare(Object value1,
Object value2,
String operator,
String type,
String format,
List<String> messages,
Locale locale,
ClassLoader loader) |
static Object |
getInstance(String className)
Returns an instance of the specified class
|
static boolean |
instanceOf(Object obj,
Class<?> typeClass)
Tests if an object is an instance of a sub-class of or properly implements an interface
|
static boolean |
instanceOf(Object obj,
Object typeObject)
Tests if an object is an instance of a sub-class of or properly implements an interface
|
static boolean |
instanceOf(Object obj,
String typeName)
Tests if an object is an instance of a sub-class of or properly implements an interface
|
static boolean |
instanceOf(Object obj,
String typeName,
ClassLoader loader)
Tests if an object is an instance of a sub-class of or properly implements an interface
|
static boolean |
interfaceOf(Object obj,
Class<?> interfaceClass)
Tests if an object properly implements the specified interface
|
static boolean |
interfaceOf(Object obj,
Object interfaceObject)
Tests if an object properly implements the specified interface
|
static boolean |
interfaceOf(Object obj,
String interfaceName)
Tests if an object properly implements the specified interface
|
static boolean |
isOrSubOf(Object obj,
Class<?> parentClass)
Tests if an object is an instance of or a sub-class of the parent
|
static boolean |
isOrSubOf(Object obj,
Object parentObject)
Tests if an object is an instance of or a sub-class of the parent
|
static boolean |
isOrSubOf(Object obj,
String parentName)
Tests if an object is an instance of or a sub-class of the parent
|
static Class<?> |
loadClass(String className)
Loads a class with the current thread's context classloader
|
static Class<?> |
loadClass(String className,
ClassLoader loader)
Loads a class with the current thread's context classloader
|
static Object |
simpleTypeConvert(Object obj,
String type,
String format,
Locale locale)
Converts the passed object to the named simple type; supported types
include: String, Boolean, Double, Float, Long, Integer, Date (java.sql.Date),
Time, Timestamp;
|
public static final String module
public static final String LANG_PACKAGE
public static final String SQL_PACKAGE
public static Class<?> loadClass(String className) throws ClassNotFoundException
className - The name of the class to loadClassNotFoundExceptionpublic static Class<?> loadClass(String className, ClassLoader loader) throws ClassNotFoundException
className - The name of the class to loadClassNotFoundExceptionpublic static Object getInstance(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException
className - Name of the class to instantiateClassNotFoundExceptionInstantiationExceptionIllegalAccessExceptionpublic static boolean interfaceOf(Object obj, String interfaceName) throws ClassNotFoundException
obj - Object to testinterfaceName - Name of the interface to test againstClassNotFoundExceptionpublic static boolean interfaceOf(Object obj, Object interfaceObject)
obj - Object to testinterfaceObject - to test againstpublic static boolean interfaceOf(Object obj, Class<?> interfaceClass)
obj - Object to testinterfaceClass - Class to test againstpublic static boolean isOrSubOf(Object obj, String parentName) throws ClassNotFoundException
obj - Object to testparentName - Name of the parent class to test againstClassNotFoundExceptionpublic static boolean isOrSubOf(Object obj, Object parentObject)
obj - Object to testparentObject - Object to test againstpublic static boolean isOrSubOf(Object obj, Class<?> parentClass)
obj - Object to testparentClass - Class to test againstpublic static boolean instanceOf(Object obj, Object typeObject)
obj - Object to testtypeObject - Object to test againstpublic static boolean instanceOf(Object obj, String typeName)
obj - Object to testtypeObject - Object to test againstpublic static boolean instanceOf(Object obj, String typeName, ClassLoader loader)
obj - Object to testtypeObject - Object to test againstpublic static boolean instanceOf(Object obj, Class<?> typeClass)
obj - Object to testtypeClass - Class to test againstpublic static Object simpleTypeConvert(Object obj, String type, String format, Locale locale) throws GeneralException
obj - Object to converttype - Name of type to convert toformat - Optional (can be null) format string for Date, Time, Timestamplocale - Optional (can be null) Locale for formatting and parsing Double, Float, Long, IntegerGeneralExceptionCopyright © 2015 Atlassian. All rights reserved.