public class Introspection extends Object
Constructor and Description |
---|
Introspection() |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
convertPrimitiveType(Class<?> clazz)
Converts the primitive type to its corresponding wrapper.
|
static Field[] |
getDeclaredFields(Class<?> clazz)
Obtain the declared fields for a class taking account of any security
manager that may be configured.
|
static Method[] |
getDeclaredMethods(Class<?> clazz)
Obtain the declared methods for a class taking account of any security
manager that may be configured.
|
static String |
getPropertyName(Method setter)
Extract the Java Bean property name from the setter name.
|
static boolean |
isValidLifecycleCallback(Method method)
Determines if a method is a valid lifecycle callback method.
|
static boolean |
isValidSetter(Method method)
Determines if a method has a valid name and signature for a Java Bean
setter.
|
static Class<?> |
loadClass(Context context,
String className)
Attempt to load a class using the given Container's class loader.
|
public static String getPropertyName(Method setter)
setter
- The setter methodpublic static boolean isValidSetter(Method method)
method
- The method to testtrue
if the method does have a valid name and
signature, else false
public static boolean isValidLifecycleCallback(Method method)
method
- The method to testtrue
if the method is a valid lifecycle callback
method, else false
public static Field[] getDeclaredFields(Class<?> clazz)
clazz
- The class to introspectpublic static Method[] getDeclaredMethods(Class<?> clazz)
clazz
- The class to introspectpublic static Class<?> loadClass(Context context, String className)
context
- The class loader of this context will be used to attemmpt
to load the classclassName
- The class namenull
if loading failedCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.