public class ConstructorArg
Represents objects that are returned by the classes that implement the IConstructable.getConstructorArgs method. This encapsulates an (Object value, Class type) pair that can be used as an argument for a constructor. This class is primarily used by controls to persist the object at design time.
Constructors
Name | Description |
---|---|
ConstructorArg(Object value, Class type) | Creates a ConstructorArg object. |
Methods
Name | Description |
---|---|
getType() | Retrieves the type of the ConstrutorArg object. |
getValue() | Retrieves the value of the ConstrutorArg object. |
Integer(entry.weight)
.
Integer.TYPE
.
Creates a ConstructorArg object. The following code sample demonstrates creating a ConstructorArg array for a Point object.
public ConstructorArg[] getConstructorArgs() { return new ConstructorArg[] { new ConstructorArg(new Integer(x), Integer.TYPE), new ConstructorArg(new Integer(y), Integer.TYPE) };
Retrieves the type of the ConstrutorArg object. This is a class, such as Integer or Boolean.
Retrieves the value of the ConstrutorArg object.