Class JavaBeansExamples

java.lang.Object
net.jrodolfo.java_evolution.java01.javabeans.JavaBeansExamples

public class JavaBeansExamples extends Object
Demonstrates JavaBeans introspection, introduced in Java 1.1.
  • Constructor Details

    • JavaBeansExamples

      public JavaBeansExamples()
  • Method Details

    • propertyNames

      public String[] propertyNames() throws IntrospectionException
      Finds the JavaBeans properties declared by the sample bean.
      Returns:
      discovered property names
      Throws:
      IntrospectionException - when bean metadata cannot be read
    • accessorPair

      public String accessorPair(String propertyName) throws IntrospectionException
      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

      public Class propertyType(String propertyName) throws IntrospectionException
      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

      public String eventSetName() throws IntrospectionException
      Finds the listener set exposed through add/remove listener methods.
      Returns:
      event set name
      Throws:
      IntrospectionException - when bean metadata cannot be read
    • eventListenerParameterType

      public Class eventListenerParameterType() throws IntrospectionException
      Finds the event object type accepted by the sample listener method.
      Returns:
      event object type
      Throws:
      IntrospectionException - when bean metadata cannot be read