public class AClassUtils extends Object
| 构造器和说明 |
|---|
AClassUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
boxUnboxable(AClass aclass)
Check the type support unbox or box.
|
static boolean |
checkAssignable(AClass from,
AClass to)
Check a type(
from) whether or not assign to other type(to). |
static AClass[] |
convertToAClass(Class<?>[] classes)
|
static List<Class<?>> |
getAllInterfaces(AClass aclass)
Get all interface from an
AClass |
static AClass |
getArithmeticalResultType(AClass... types)
according the passed type list, to figure out the finally result type
|
static AClass |
getPrimitiveAClass(AClass aclass)
Get the primitive type if the argument is wrap type, otherwise
return the argument self.
|
static AClass |
getPrimitiveWrapAClass(AClass aclass)
Get the primitive wrap type if the argument is primitive type, otherwise
return the argument self.
|
static boolean |
isArithmetical(AClass aclass)
Check the specify whether or not as an arithmetical operation factor.
|
static boolean |
isPrimitiveWrapAClass(AClass aclass)
Check the specify type is primitive wrap type.
|
static boolean |
visible(AClass where,
AClass callFrom,
AClass methodDescription,
int modifiers)
Check the method call is visible, following is an example:
Class Super {
public void call() {...}
}
Class Sub extends Super {
}
Class Main {
public static void main(String... args) {
Sub sub = new Sub();
sub.call();
}
}
For code
sub.call(), see parameter description for detail. |
public static boolean isPrimitiveWrapAClass(AClass aclass)
aclass - public static AClass getPrimitiveAClass(AClass aclass)
public static AClass getPrimitiveWrapAClass(AClass aclass)
public static AClass getArithmeticalResultType(AClass... types)
public static boolean isArithmetical(AClass aclass)
public static boolean boxUnboxable(AClass aclass)
public static boolean visible(AClass where, AClass callFrom, AClass methodDescription, int modifiers)
Check the method call is visible, following is an example:
Class Super {
public void call() {...}
}
Class Sub extends Super {
}
Class Main {
public static void main(String... args) {
Sub sub = new Sub();
sub.call();
}
}
For code sub.call(), see parameter description for detail.
where - the call occur in which class, in preceding code sub.call(),
the where is Main.classcallFrom - where the call from, in preceding code sub.call(),
the callFrom is Sub.classdeclaringClass - the method declaring class, in preceding code sub.call(),
the declaringClass is Super.classmethodDescription - method descriptionmodifiers - the modifier of methodpublic static boolean checkAssignable(AClass from, AClass to)
from) whether or not assign to other type(to).public static List<Class<?>> getAllInterfaces(AClass aclass)
AClassCopyright © 2015. All rights reserved.