Interface DynaClass

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      DynaProperty[] getDynaProperties()
      Return an array of ProperyDescriptors for the properties currently defined in this DynaClass.
      DynaProperty getDynaProperty​(java.lang.String name)
      Return a property descriptor for the specified property, if it exists; otherwise, return null.
      java.lang.String getName()
      Return the name of this DynaClass (analogous to the getName() method of java.lang.Class), which allows the same DynaClass implementation class to support different dynamic classes, with different sets of properties.
      DynaBean newInstance()
      Instantiate and return a new DynaBean instance, associated with this DynaClass.
    • Method Detail

      • getDynaProperties

        DynaProperty[] getDynaProperties()

        Return an array of ProperyDescriptors for the properties currently defined in this DynaClass. If no properties are defined, a zero-length array will be returned.

        FIXME - Should we really be implementing getBeanInfo() instead, which returns property descriptors and a bunch of other stuff?

        Returns:
        the set of properties for this DynaClass
      • getDynaProperty

        DynaProperty getDynaProperty​(java.lang.String name)
        Return a property descriptor for the specified property, if it exists; otherwise, return null.
        Parameters:
        name - Name of the dynamic property for which a descriptor is requested
        Returns:
        The descriptor for the specified property
        Throws:
        java.lang.IllegalArgumentException - if no property name is specified
      • getName

        java.lang.String getName()
        Return the name of this DynaClass (analogous to the getName() method of java.lang.Class), which allows the same DynaClass implementation class to support different dynamic classes, with different sets of properties.
        Returns:
        the name of the DynaClass
      • newInstance

        DynaBean newInstance()
                      throws java.lang.IllegalAccessException,
                             java.lang.InstantiationException
        Instantiate and return a new DynaBean instance, associated with this DynaClass.
        Returns:
        A new DynaBean instance
        Throws:
        java.lang.IllegalAccessException - if the Class or the appropriate constructor is not accessible
        java.lang.InstantiationException - if this Class represents an abstract class, an array class, a primitive type, or void; or if instantiation fails for some other reason