|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teatrove.tea.util.BeanAnalyzer
public class BeanAnalyzer
The JavaBean Introspector for Tea.
Introspector| Field Summary | |
|---|---|
static String |
ELEMENT_TYPE_FIELD_NAME
The name of the special field that specializes a keyed property type: "ELEMENT_TYPE" |
static String |
KEYED_PROPERTY_NAME
The name given to keyed properties: "[]" |
static String |
LENGTH_PROPERTY_NAME
The name given to the length property: "length" |
| Constructor Summary | |
|---|---|
BeanAnalyzer()
|
|
| Method Summary | |
|---|---|
static Map<String,PropertyDescriptor> |
getAllProperties(GenericType root)
A function that returns a Map of all the available properties on a given class including write-only properties. |
static void |
main(String[] args)
Test program. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LENGTH_PROPERTY_NAME
public static final String KEYED_PROPERTY_NAME
public static final String ELEMENT_TYPE_FIELD_NAME
| Constructor Detail |
|---|
public BeanAnalyzer()
| Method Detail |
|---|
public static void main(String[] args)
throws Exception
Exception
public static Map<String,PropertyDescriptor> getAllProperties(GenericType root)
throws IntrospectionException
Interfaces receive all the properties available in Object. Arrays, Strings and Collections all receive a "length" property. An array's "length" PropertyDescriptor has no read or write methods.
Instead of indexed properties, there may be keyed properties in the
map, represented by a KeyedPropertyDescriptor. Arrays, Strings
and Lists always have keyed properties with a key type of int.
Because the value returned from a keyed property method may be more specific than the method signature describes (such is often the case with collections), a bean class can contain a special field that indicates what that specific type should be. The signature of this field is as follows: public static final Class ELEMENT_TYPE = <type>.class;.
IntrospectionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||