public class ClassUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createClassFilePath(java.lang.Class c)
Returns the relative pathname of a class as a file path (separated with '/')
|
static java.lang.String |
createFullClassName(java.lang.String pkgPath,
java.lang.String simpleClassName)
Returns a fully qualified class name.
|
static java.lang.String |
createPackageFilePath(java.lang.Class c)
Returns the relative package path of a class as a file path (separated with '/')
|
static java.lang.String |
createPackagePath(java.lang.Class c)
Returns the package pathname of a class as a file path (separated with '/')
|
static java.lang.String |
createPackagePath(java.lang.Object obj)
Returns the objects class.pathname as a file path (separated with '/')
|
static java.lang.String |
createSourceFilePath(java.lang.Class c)
Returns the relative pathname of a java source file as a file path (separated with '/')
|
static java.lang.reflect.Constructor |
findConstructor(java.lang.Class thisClass,
java.lang.Class paramType)
Finds the constructor in thisClass that matches the parameter type paramType
|
static java.lang.reflect.Constructor |
findConstructor(java.lang.Class thisClass,
java.lang.Class[] paramTypes)
Finds the constructor in thisClass that matches all the given parameter types
|
static java.lang.String |
getAnnotationValue(java.lang.annotation.Annotation anno,
java.lang.String annoVarName)
Returns the value of the variable of the given annotation.
|
static boolean |
isFloatingPointType(java.lang.Class c) |
static boolean |
isImplementing(java.lang.Class theClass,
java.lang.Class theInterface) |
static boolean |
isIntegerType(java.lang.Class c) |
static boolean |
isNumericType(java.lang.Class c) |
static boolean |
isSubClassOf(java.lang.Object obj,
java.lang.Class otherClass)
Tests if the given object is an instance of a sub-class of otherClass.
|
static int |
sizeOfObject(java.lang.Object src)
This method serializes an object in order to figure out how much memory it consumes.
|
public static java.lang.String getAnnotationValue(java.lang.annotation.Annotation anno, java.lang.String annoVarName) throws java.lang.Exception
java.lang.Exception
public static boolean isSubClassOf(java.lang.Object obj, java.lang.Class otherClass)
public static boolean isImplementing(java.lang.Class theClass, java.lang.Class theInterface)
public static java.lang.reflect.Constructor findConstructor(java.lang.Class thisClass, java.lang.Class paramType)
public static java.lang.reflect.Constructor findConstructor(java.lang.Class thisClass, java.lang.Class[] paramTypes)
public static boolean isIntegerType(java.lang.Class c)
public static boolean isFloatingPointType(java.lang.Class c)
public static boolean isNumericType(java.lang.Class c)
public static java.lang.String createClassFilePath(java.lang.Class c)
public static java.lang.String createPackageFilePath(java.lang.Class c)
public static java.lang.String createSourceFilePath(java.lang.Class c)
public static java.lang.String createPackagePath(java.lang.Class c)
public static java.lang.String createPackagePath(java.lang.Object obj)
public static java.lang.String createFullClassName(java.lang.String pkgPath, java.lang.String simpleClassName)
public static int sizeOfObject(java.lang.Object src)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.