|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.retroweaver.runtime.java.lang.Class_
public final class Class_
Replacements for methods added to java.lang.Class in Java 1.5.
Method Summary | ||
---|---|---|
static java.lang.Class |
asSubclass(java.lang.Class<?> c,
java.lang.Class<?> superclass)
Replacement for Class.asSubclass(Class). |
|
static java.lang.Object |
cast(java.lang.Class c,
java.lang.Object object)
Replacement for Class.cast(Object). |
|
static
|
getAnnotation(java.lang.Class c,
java.lang.Class<T> annotationType)
Returns this element's annotation for the specified type if such an annotation is present, else null. |
|
static Annotation[] |
getAnnotations(java.lang.Class c)
Returns all annotations present on this element. |
|
static java.lang.String |
getCanonicalName(java.lang.Class class_)
|
|
static Annotation[] |
getDeclaredAnnotations(java.lang.Class c)
Returns all annotations that are directly present on this element. |
|
static java.lang.Class<?> |
getEnclosingClass(java.lang.Class class_)
|
|
static java.lang.reflect.Constructor<?> |
getEnclosingConstructor(java.lang.Class class_)
|
|
static java.lang.reflect.Method |
getEnclosingMethod(java.lang.Class class_)
|
|
static
|
getEnumConstants(java.lang.Class<T> class_)
Replacement for Class.getEnumConstants(). |
|
static Type[] |
getGenericInterfaces(java.lang.Class class_)
|
|
static Type |
getGenericSuperclass(java.lang.Class class_)
|
|
static java.lang.String |
getSimpleName(java.lang.Class class_)
replacement for Class.getSimpleName() |
|
static TypeVariable[] |
getTypeParameters(java.lang.Class class_)
|
|
static boolean |
isAnnotation(java.lang.Class c)
|
|
static boolean |
isAnnotationPresent(java.lang.Class c,
java.lang.Class<? extends Annotation> annotationType)
Returns true if an annotation for the specified type is present on this element, else false. |
|
static boolean |
isAnonymousClass(java.lang.Class class_)
replacement for Class.isAnonymousClass() |
|
static
|
isEnum(java.lang.Class<T> class_)
Replacement for Class.isEnum(). |
|
static boolean |
isLocalClass(java.lang.Class class_)
|
|
static boolean |
isMemberClass(java.lang.Class class_)
|
|
static boolean |
isSynthetic(java.lang.Class class_)
replacement for Class.isSynthetic() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isAnnotation(java.lang.Class c)
public static <T extends Annotation> T getAnnotation(java.lang.Class c, java.lang.Class<T> annotationType)
public static Annotation[] getAnnotations(java.lang.Class c)
public static Annotation[] getDeclaredAnnotations(java.lang.Class c)
public static boolean isAnnotationPresent(java.lang.Class c, java.lang.Class<? extends Annotation> annotationType)
public static java.lang.Class asSubclass(java.lang.Class<?> c, java.lang.Class<?> superclass)
c
- a Classsuperclass
- another Class which must be a superclass of c
java.lang.ClassCastException
- if c ispublic static java.lang.Object cast(java.lang.Class c, java.lang.Object object)
c
- Class we want to cast obj toobject
- object we want to cast
null
if the object is
null
.
java.lang.ClassCastException
- if obj is not
null
or an instance of cpublic static <T> boolean isEnum(java.lang.Class<T> class_)
class_
- class we want to test.
public static <T> T[] getEnumConstants(java.lang.Class<T> class_)
class_
- class we want to get Enum constants for.
public static boolean isAnonymousClass(java.lang.Class class_)
public static java.lang.String getSimpleName(java.lang.Class class_)
public static boolean isSynthetic(java.lang.Class class_)
public static TypeVariable[] getTypeParameters(java.lang.Class class_) throws GenericSignatureFormatError
GenericSignatureFormatError
public static Type getGenericSuperclass(java.lang.Class class_) throws GenericSignatureFormatError, TypeNotPresentException, MalformedParameterizedTypeException
GenericSignatureFormatError
TypeNotPresentException
MalformedParameterizedTypeException
public static Type[] getGenericInterfaces(java.lang.Class class_) throws GenericSignatureFormatError, TypeNotPresentException, MalformedParameterizedTypeException
GenericSignatureFormatError
TypeNotPresentException
MalformedParameterizedTypeException
public static java.lang.reflect.Method getEnclosingMethod(java.lang.Class class_)
public static java.lang.reflect.Constructor<?> getEnclosingConstructor(java.lang.Class class_)
public static java.lang.Class<?> getEnclosingClass(java.lang.Class class_)
public static java.lang.String getCanonicalName(java.lang.Class class_)
public static boolean isLocalClass(java.lang.Class class_)
public static boolean isMemberClass(java.lang.Class class_)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |