|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.lang.ClassRedirects
public class ClassRedirects
Implementations of java.lang.Class methods added in jdk5
| Method Summary | ||
|---|---|---|
static
|
asSubclass(java.lang.Class<T> clazz,
java.lang.Class thisClazz)
|
|
static
|
cast(java.lang.Class<T> clazz,
java.lang.Object o)
Cast an object |
|
static boolean |
contains(java.lang.String string,
java.lang.CharSequence s)
Whether the string contains the character sequence |
|
static java.lang.String |
getCanonicalName(java.lang.Class clazz)
Returns the canonical name of the the underlying class as defined by the Java Language Specification. |
|
static java.lang.Class<?> |
getEnclosingClass(java.lang.Class clazz)
This method cannot be implemented as it relies on native method info. |
|
static java.lang.reflect.Constructor<?> |
getEnclosingConstructor(java.lang.Class clazz)
This method cannot be implemented as it relies on native method info. |
|
static java.lang.reflect.Method |
getEnclosingMethod(java.lang.Class clazz)
This method cannot be implemented as it relies on native method info. |
|
static
|
getEnumConstants(java.lang.Class<T> enumType)
Get the enumeration constants |
|
static java.lang.reflect.Type[] |
getGenericInterfaces(java.lang.Class clazz)
|
|
static java.lang.reflect.Type |
getGenericSuperclass(java.lang.Class clazz)
|
|
static java.lang.String |
getSimpleName(java.lang.Class clazz)
Implementation of the jdk5 Class.getSimpleName() method. |
|
static
|
getTypeParameters(java.lang.Class clazz)
|
|
static boolean |
isAnonymousClass(java.lang.Class clazz)
Returns true if and only if the underlying class is an anonymous class. |
|
static boolean |
isEnum(java.lang.Class clazz)
Whether the class is an enum |
|
static boolean |
isLocalClass(java.lang.Class clazz)
|
|
static boolean |
isMemberClass(java.lang.Class clazz)
|
|
static boolean |
isSynthetic(java.lang.Class clazz)
|
|
static java.lang.String |
quoteReplacement(java.lang.String string)
Quote the replacement string |
|
static java.lang.String |
replace(java.lang.String string,
java.lang.CharSequence target,
java.lang.CharSequence replacement)
Replace a character sequence |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isEnum(java.lang.Class clazz)
clazz - the class
public static <T extends EnumImpl<T>> T[] getEnumConstants(java.lang.Class<T> enumType)
T - the enum typeenumType - the enum type
public static <T> T cast(java.lang.Class<T> clazz,
java.lang.Object o)
T - the expected typeclazz - the expected classo - the object
public static <T> java.lang.Class<? extends T> asSubclass(java.lang.Class<T> clazz,
java.lang.Class thisClazz)
clazz - thisClazz -
java.lang.ClassCastException - if thisClazz object does not
represent a subclass of the specified class (here "subclass" includes
the class itself).
public static java.lang.String replace(java.lang.String string,
java.lang.CharSequence target,
java.lang.CharSequence replacement)
string - the stringtarget - the string to replacereplacement - the replacement text
public static boolean contains(java.lang.String string,
java.lang.CharSequence s)
string - the strings - the character sequence
public static java.lang.String quoteReplacement(java.lang.String string)
string - the quoted stringpublic static java.lang.String getSimpleName(java.lang.Class clazz)
The simple name of an array is the simple name of the component type with "[]" appended. In particular the simple name of an array whose component type is anonymous is "[]".
clazz - the Class instance
public static java.lang.String getCanonicalName(java.lang.Class clazz)
clazz - the Class instance
public static boolean isAnonymousClass(java.lang.Class clazz)
clazz - the Class instance
public static boolean isSynthetic(java.lang.Class clazz)
clazz -
public static boolean isLocalClass(java.lang.Class clazz)
clazz - the Class instance
public static boolean isMemberClass(java.lang.Class clazz)
clazz - the Class instance
public static <T> java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters(java.lang.Class clazz)
clazz -
public static java.lang.reflect.Type getGenericSuperclass(java.lang.Class clazz)
clazz -
public static java.lang.reflect.Type[] getGenericInterfaces(java.lang.Class clazz)
clazz -
public static java.lang.reflect.Method getEnclosingMethod(java.lang.Class clazz)
clazz -
public static java.lang.reflect.Constructor<?> getEnclosingConstructor(java.lang.Class clazz)
clazz -
public static java.lang.Class<?> getEnclosingClass(java.lang.Class clazz)
clazz -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||