Class JavaBeansExamples
java.lang.Object
net.jrodolfo.java_evolution.java01.javabeans.JavaBeansExamples
Demonstrates JavaBeans introspection, introduced in Java 1.1.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSmall bean used by the introspection examples.static classEvent object delivered when a project changes.static interfaceListener type used to demonstrate JavaBeans event-set discovery. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessorPair(String propertyName) Finds the read and write methods for a JavaBeans property.Finds the event object type accepted by the sample listener method.Finds the listener set exposed through add/remove listener methods.String[]Finds the JavaBeans properties declared by the sample bean.propertyType(String propertyName) Finds the Java type of a JavaBeans property.
-
Constructor Details
-
JavaBeansExamples
public JavaBeansExamples()
-
-
Method Details
-
propertyNames
Finds the JavaBeans properties declared by the sample bean.- Returns:
- discovered property names
- Throws:
IntrospectionException- when bean metadata cannot be read
-
accessorPair
Finds the read and write methods for a JavaBeans property.- Parameters:
propertyName- property to inspect- Returns:
- read method name followed by write method name
- Throws:
IntrospectionException- when bean metadata cannot be read
-
propertyType
Finds the Java type of a JavaBeans property.- Parameters:
propertyName- property to inspect- Returns:
- property type
- Throws:
IntrospectionException- when bean metadata cannot be read
-
eventSetName
Finds the listener set exposed through add/remove listener methods.- Returns:
- event set name
- Throws:
IntrospectionException- when bean metadata cannot be read
-
eventListenerParameterType
Finds the event object type accepted by the sample listener method.- Returns:
- event object type
- Throws:
IntrospectionException- when bean metadata cannot be read
-