Methods | This Package | All Packages
Represents a constructor argument for a class.
package com.ms.wfc.core
public class ConstructorArg
Remarks
This class is primarily used to persist an object at design time. The IConstructable.getContructorArgs method returns an array of ConstructorArg objects that represent the constructor arguments needed to create the object. By implementing IConstructable, a class can participate in code generation.
The following example shows a Point class that implements IConstructable:
public class Point implements IConstructable
{
public int x; // The horizontal position of the point.
public int y; // The vertical position of the point.
public Point(int x, int y)
{
this.x = x;
this.y = y;
}
public ConstructorArg[] getConstructorArgs()
{
return new ConstructorArg[] {
new ConstructorArg(new Integer(x), Integer.TYPE),
new ConstructorArg(new Integer(y), Integer.TYPE)
};
}
... // Remaining class implementation.
}