|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.opensuit.core.util.ReflectionHelper
public class ReflectionHelper
Nested Class Summary | |
---|---|
static class |
ReflectionHelper.NumberOutOfBoundsException
|
Constructor Summary | |
---|---|
ReflectionHelper()
|
Method Summary | |
---|---|
static java.lang.Object |
collection2Obj(java.util.Collection<?> iColl,
java.lang.Class<?> iTarget)
Transforms a list into the targeted vector type |
static java.lang.Class<?> |
getNonPrimitiveClass(java.lang.Class<?> iClass)
Returns the equivalent non-primitive class |
static java.lang.Class<?> |
getVectorElementClass(java.lang.reflect.Type iType)
Returns the component type if the given type is of vector type (List or Array) |
static java.lang.reflect.Type |
getVectorElementType(java.lang.reflect.Type iType)
|
static boolean |
isAssignable(java.lang.Class<?> iClass1,
java.lang.Class<?> iClass2)
Checks if class1 is assignable as class2. |
static boolean |
isVector(java.lang.reflect.Type iType)
Determines whether the given type is vector (array, list, ...) |
static void |
main(java.lang.String[] args)
|
static java.util.Collection<java.lang.Object> |
obj2Collection(java.lang.Object iObject)
Returns a Collection object from any vector type. |
static java.lang.String |
obj2String(java.lang.Object o)
|
static java.lang.Object |
parse2Type(java.lang.String iValue,
java.lang.Class target)
|
static java.lang.Class<?> |
type2Class(java.lang.reflect.Type iType)
Returns the raw Class from the Java 5 Type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectionHelper()
Method Detail |
---|
public static java.lang.Class<?> type2Class(java.lang.reflect.Type iType)
iType
-
public static java.lang.Class<?> getNonPrimitiveClass(java.lang.Class<?> iClass)
iClass
-
public static boolean isAssignable(java.lang.Class<?> iClass1, java.lang.Class<?> iClass2)
iClass1
- iClass2
-
public static java.lang.Class<?> getVectorElementClass(java.lang.reflect.Type iType)
iType
- represent the instance's type, which you want to check
public static java.lang.reflect.Type getVectorElementType(java.lang.reflect.Type iType)
public static boolean isVector(java.lang.reflect.Type iType)
iType
-
public static java.util.Collection<java.lang.Object> obj2Collection(java.lang.Object iObject)
iObject
- copy
-
public static java.lang.Object collection2Obj(java.util.Collection<?> iColl, java.lang.Class<?> iTarget)
iColl
- iTarget
-
public static java.lang.String obj2String(java.lang.Object o)
public static java.lang.Object parse2Type(java.lang.String iValue, java.lang.Class target)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |