Method Summary |
|
public Class | asDecl(Type t) |
public Class | asDecl(Class c) |
public Type | createParameterizedType(Class rawType, Type... arguments) Returns the
Type object that represents
clazz<T1,T2,T3> . |
public Class<T> | erasure(Type t) Returns the runtime representation of the given type.
This corresponds to the notion of the erasure in JSR-14.
Because of the difference in the way APT and the Java reflection
treats primitive type and array type, we can't define this method
on
Navigator .
It made me realize how difficult it is to define the common navigation
layer for two different underlying reflection library. |
public Class | findClass(String className, Class referencePoint) |
public Type | getBaseClass(Type t, Class sup) |
public Location | getClassLocation(Class clazz) |
public String | getClassName(Class clazz) |
public String | getClassShortName(Class clazz) |
public Type | getComponentType(Type t) |
public Field | getDeclaredField(Class clazz, String fieldName) |
public Collection<? extends Field> | getDeclaredFields(Class clazz) |
public Collection<? extends Method> | getDeclaredMethods(Class clazz) |
public Class | getDeclaringClassForField(Field field) |
public Class | getDeclaringClassForMethod(Method method) |
public Field[] | getEnumConstants(Class clazz) |
public Location | getFieldLocation(Field field) |
public String | getFieldName(Field field) |
public Type | getFieldType(Field field) |
public Location | getMethodLocation(Method method) |
public String | getMethodName(Method method) |
public Type[] | getMethodParameters(Method method) |
public String | getPackageName(Class clazz) |
public Type | getPrimitive(Class primitiveType) |
public Type | getReturnType(Method method) |
public Class | getSuperClass(Class clazz) |
public Type | getTypeArgument(Type type, int i) |
public String | getTypeName(Type type) |
public Type | getVoidType() |
public boolean | hasDefaultConstructor(Class c) |
public boolean | isAbstract(Class clazz) |
public boolean | isArray(Type t) |
public boolean | isArrayButNotByteArray(Type t) |
public boolean | isBridgeMethod(Method method) |
public boolean | isEnum(Class c) |
public boolean | isFinal(Class clazz) |
public boolean | isInnerClass(Class clazz) |
public boolean | isInterface(Class clazz) |
public boolean | isOverriding(Method method, Class base) |
public boolean | isParameterizedType(Type type) |
public boolean | isPrimitive(Type type) |
public boolean | isPublicField(Field field) |
public boolean | isPublicMethod(Method method) |
public boolean | isStaticField(Field field) |
public boolean | isStaticMethod(Method method) |
public boolean | isSubClassOf(Type sub, Type sup) |
public boolean | isTransient(Field f) |
public Class | ref(Class c) |
public Class | use(Class c) |