public final class BeanHelper
extends java.lang.Object
java.beans.Introspector
and
other classes in the java.beans.*
package. This is required to allow Android developers to use univocity-parsers.
Android developers should add have openbeans-1.0.jar
in their classpath to be able to use univocity-parsers.
When available, the classes from package com.googlecode.openbeans.*
will be used, otherwise the
bean introspection classes classes from java.beans.*
package will be loaded.
If everything fails, then the parser will try to manipulate fields in annotated java beans directly, instead
of using their getters and setters.Modifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
beanInfoMethod |
private static java.util.Map<java.lang.Class<?>,java.lang.ref.WeakReference<PropertyWrapper[]>> |
descriptors |
private static PropertyWrapper[] |
EMPTY |
private static java.lang.Class<?> |
introspectorClass |
(package private) static java.lang.reflect.Method |
PROPERTY_NAME_METHOD |
(package private) static java.lang.reflect.Method |
PROPERTY_READ_METHOD |
(package private) static java.lang.reflect.Method |
PROPERTY_WRITE_METHOD |
private static java.lang.reflect.Method |
propertyDescriptorMethod |
Modifier | Constructor and Description |
---|---|
private |
BeanHelper() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.Class<?> |
findIntrospectorImplementationClass() |
private static java.lang.reflect.Method |
getBeanInfoMethod() |
private static java.lang.reflect.Method |
getMethod(java.lang.String methodName,
java.lang.reflect.Method method,
boolean fromComponentType) |
static PropertyWrapper[] |
getPropertyDescriptors(java.lang.Class<?> beanClass)
Returns the property descriptors of all properties available from a class
|
private static final PropertyWrapper[] EMPTY
private static final java.lang.Class<?> introspectorClass
private static final java.lang.reflect.Method beanInfoMethod
private static final java.lang.reflect.Method propertyDescriptorMethod
static java.lang.reflect.Method PROPERTY_WRITE_METHOD
static java.lang.reflect.Method PROPERTY_READ_METHOD
static java.lang.reflect.Method PROPERTY_NAME_METHOD
private static final java.util.Map<java.lang.Class<?>,java.lang.ref.WeakReference<PropertyWrapper[]>> descriptors
public static PropertyWrapper[] getPropertyDescriptors(java.lang.Class<?> beanClass)
beanClass
- the class whose property descriptors should be returnedprivate static java.lang.Class<?> findIntrospectorImplementationClass()
private static java.lang.reflect.Method getBeanInfoMethod()
private static java.lang.reflect.Method getMethod(java.lang.String methodName, java.lang.reflect.Method method, boolean fromComponentType)