Top Description Fields Constructors Methods
com.rometools.rome.feed.impl

public Class BeanIntrospector

extends Object
Class Inheritance
Imports
java.lang.reflect.Method, .Modifier, java.util.ArrayList, .HashMap, .HashSet, .List, .Map, .Set

Obtains all property descriptors from a bean (interface or implementation).

The java.beans.Introspector does not process the interfaces hierarchy chain, this one does.

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final Map<Class<?>, PropertyDescriptor[]>
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
decapitalize(String name)

Make first character lower case unless the second character is upper case.

private static PropertyDescriptor[]
getPDs(final Class<?> clazz)

private static Map<String, PropertyDescriptor>
getPDs(final Method[] methods, final boolean setters)

private static synchronized PropertyDescriptor[]

Returns:

All PropertyDescriptor for properties with getters and setters for the given class.
getPropertyDescriptors
(final Class<?>
The class to extract the desired PropertyDescriptors from
clazz
)

Extract all PropertyDescriptors for properties with getters and setters for the given class.

public static List<PropertyDescriptor>

Returns:

All PropertyDescriptors for properties with a getter that does not come from Object and does not accept parameters.
getPropertyDescriptorsWithGetters
(final Class<?>
The class to extract the desired PropertyDescriptors from
clazz
)

Extract all PropertyDescriptors for properties with a getter that does not come from Object and does not accept parameters.

public static List<PropertyDescriptor>

Returns:

All PropertyDescriptors for properties with a getter (that does not come from Object and does not accept parameters) and a setter.
getPropertyDescriptorsWithGettersAndSetters
(final Class<?>
The class to extract the desired PropertyDescriptors from
clazz
)

Extract all PropertyDescriptors for properties with a getter (that does not come from Object and does not accept parameters) and a setter.

private static List<PropertyDescriptor>
merge(final Map<String, PropertyDescriptor> getters, final Map<String, PropertyDescriptor> setters)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BOOLEAN_GETTERback to summary
private static final String BOOLEAN_GETTER
GETTERback to summary
private static final String GETTER
introspectedback to summary
private static final Map<Class<?>, PropertyDescriptor[]> introspected
SETTERback to summary
private static final String SETTER

Constructor Detail

BeanIntrospectorback to summary
private BeanIntrospector()

Method Detail

decapitalizeback to summary
private static String decapitalize(String name)

Make first character lower case unless the second character is upper case.

getPDsback to summary
private static PropertyDescriptor[] getPDs(final Class<?> clazz)
getPDsback to summary
private static Map<String, PropertyDescriptor> getPDs(final Method[] methods, final boolean setters)
getPropertyDescriptorsback to summary
private static synchronized PropertyDescriptor[] getPropertyDescriptors(final Class<?> clazz)

Extract all PropertyDescriptors for properties with getters and setters for the given class.

Parameters
clazz:Class<?>

The class to extract the desired PropertyDescriptors from

Returns:PropertyDescriptor[]

All PropertyDescriptor for properties with getters and setters for the given class.

getPropertyDescriptorsWithGettersback to summary
public static List<PropertyDescriptor> getPropertyDescriptorsWithGetters(final Class<?> clazz)

Extract all PropertyDescriptors for properties with a getter that does not come from Object and does not accept parameters.

Parameters
clazz:Class<?>

The class to extract the desired PropertyDescriptors from

Returns:List<PropertyDescriptor>

All PropertyDescriptors for properties with a getter that does not come from Object and does not accept parameters.

getPropertyDescriptorsWithGettersAndSettersback to summary
public static List<PropertyDescriptor> getPropertyDescriptorsWithGettersAndSetters(final Class<?> clazz)

Extract all PropertyDescriptors for properties with a getter (that does not come from Object and does not accept parameters) and a setter.

Parameters
clazz:Class<?>

The class to extract the desired PropertyDescriptors from

Returns:List<PropertyDescriptor>

All PropertyDescriptors for properties with a getter (that does not come from Object and does not accept parameters) and a setter.

mergeback to summary
private static List<PropertyDescriptor> merge(final Map<String, PropertyDescriptor> getters, final Map<String, PropertyDescriptor> setters)