All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.dip.BeanMorpher

java.lang.Object
   |
   +----com.ibm.beans.dip.BeanMorpher

public class BeanMorpher
extends Object
This class generates Java code for a dippable class using the DippableGenerator class.


Constructor Index

 o BeanMorpher(String, String, Boolean, Boolean, String, String, Boolean, String, Boolean, String, Boolean, Comment, String)
Constructs a BeanMorpher.

Method Index

 o main(String[])
This is the command line program for morphing a bean class.

Constructors

 o BeanMorpher
 public BeanMorpher(String originalClassName,
                    String impName,
                    Boolean extended,
                    Boolean override,
                    String apis,
                    String dips,
                    Boolean dipsSpecifyOverrides,
                    String newClassName,
                    Boolean finalClass,
                    String finalMethodNames,
                    Boolean beanInfo,
                    Comment cmt,
                    String pathName)
Constructs a BeanMorpher. This constructor is primarily used by source code that needs to create the source code for dippable bean.

Parameters:
originalClassName -
A String containing either the package qualified class name for the morph candidate bean or a String containing both a package qualified interface name and a corresponding package qualified implementation bean. If given a class+interface pair, the class name is always first and the interface name is always second, and they are separated by a plus sign (+).
impName -
The package qualified class name of the DippableSupport or DippableExtendedSupport implementation class used by this dippable bean. This parameter can be null which causes the either the com.ibm.beans.DippableSupportImp class or the com.ibm.beans.DippableExtendedSupportImp class to be used. The decision on which implementation class should be used as the default is based on the setting of the extended flag.
extended -
This flag indicates which interface the dippable bean should override.
true means implement DippableExtended; false means implement only Dippable.

This parameter can be null.

override -
This flag indicates which methods the dippable bean should override.
true means override all general methods from all parent classes; false means override only the general methods in the original bean.

Only valid if the input is a class.

This parameter can be null.

apis -
A String containing a series of class+interface pairs to be added to the API of the generated dippable bean. For each class+interface pair, the dippable bean implements the interface and uses the implementation. In the String, the class name is always first, the interface name is always second, and they are separated by a plus sign (+). Pairs are separated in the string by a semicolon (;).

For more information, see the additionalAPIs parameter in the DippableGenerator class

This parameter can be null.

dips -
A String containing a series of dips to be applied to the dippable bean during construction. These dips must be beans because they are instantiated with the Beans.instantiate() method. Dips are separated in the String by a semicolon (;).

This parameter can be null.

dipsSpecifyOverrides -
This flag indicates that the dips specified in the dips parameters should specify which methods should be overridden in the dippable class.
true means the dips specify which methods to override; false otherwise.

Only valid if the dips parameter is provided.

This parameter can be null.

newClassName -
A String containing a name for the new dippable bean. If null, the name of the dippable bean is based on the originalClassName argument.

This parameter can be null.

finalClass -
This flag indicates the new dippable class should be a final class.
true means create a final class; false otherwise.

This parameter can be null.

finalMethods -
A String containing a series of method names. All methods equaling these method names will be made final methods in the new dippable class. Method names are separated in the String by a semicolon (;).

Only valid if the finalClass parameter is provided.

This parameter can be null.

beanInfo -
This flag indicates the new dippable bean should not have a beanInfo.
true means create a BeanInfo; false means do not create a BeanInfo.

This parameter can be null.

cmt -
A Comment object reference.

This parameter can be null which causes a default Comment object to be created.

pathName -
A String describing the path where the new code is generated.
See Also:
DippableGenerator

Methods

 o main
 public static void main(String argv[]) throws ClassNotFoundException
This is the command line program for morphing a bean class. Its usage is:
    java com.ibm.beans.dip.BeanMorpher flags* className||class+interface
 
It outputs two Java files:
    "class name"Dippable.java
    "class name"DippableBeanInfo.java
 
The arguments to the BeanMorpher program are described in its help. To view BeanMorpher help, enter:
    java com.ibm.beans.dip.BeanMorpher -h
 

Throws: ClassNotFoundException
Thrown if one of the classes needed for morphing could not be found.

All Packages  Class Hierarchy  This Package  Previous  Next  Index