|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.javelot.functionalj.reflect.Parameter
info.javelot.functionalj.reflect.PrimitiveParameter
public class PrimitiveParameter
Used when a method is overloaded to accept a parameter of that primitive type and
its wrapper class in the same parameter position. The
PrimitiveParameter indicates that the primitive type version of the
overloaded method should be used. For example:
public void setValue(int p_value);
public void setValue(Integer p_value);
In this example, to pass a parameter of type int, the following
code should be used:
function.addParameter(new PrimitiveParameter(5));
Note that if the method is not overloaded in this way, it is not necessary to
use the PrimitiveParameter class. Simply using the wrapper class that
corresponds to the primitive type will work, as in
function.addParameter(new Integer(5));
| Constructor Summary | |
|---|---|
PrimitiveParameter(boolean p_value)
Constructs an object which indicates to use a primitive boolean
value for a parameter of the specified class. |
|
PrimitiveParameter(byte p_value)
Constructs an object which indicates to use a primitive byte
value for a parameter of the specified class. |
|
PrimitiveParameter(char p_value)
Constructs an object which indicates to use a primitive char
value for a parameter of the specified class. |
|
PrimitiveParameter(double p_value)
Constructs an object which indicates to use a primitive double
value for a parameter of the specified class. |
|
PrimitiveParameter(float p_value)
Constructs an object which indicates to use a primitive float
value for a parameter of the specified class. |
|
PrimitiveParameter(int p_value)
Constructs an object which indicates to use a primitive int
value for a parameter of the specified class. |
|
PrimitiveParameter(long p_value)
Constructs an object which indicates to use a primitive long
value for a parameter of the specified class. |
|
PrimitiveParameter(short p_value)
Constructs an object which indicates to use a primitive short
value for a parameter of the specified class. |
|
| Method Summary | |
|---|---|
String |
toString()
Returns a String representation of the object. |
| Methods inherited from class info.javelot.functionalj.reflect.Parameter |
|---|
getParameterClass, getValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PrimitiveParameter(boolean p_value)
boolean
value for a parameter of the specified class.
p_value - the primitive boolean value of the parameter.public PrimitiveParameter(byte p_value)
byte
value for a parameter of the specified class.
p_value - the primitive byte value of the parameter.public PrimitiveParameter(char p_value)
char
value for a parameter of the specified class.
p_value - the primitive char value of the parameter.public PrimitiveParameter(double p_value)
double
value for a parameter of the specified class.
p_value - the primitive double value of the parameter.public PrimitiveParameter(float p_value)
float
value for a parameter of the specified class.
p_value - the primitive float value of the parameter.public PrimitiveParameter(int p_value)
int
value for a parameter of the specified class.
p_value - the primitive int value of the parameter.public PrimitiveParameter(long p_value)
long
value for a parameter of the specified class.
p_value - the primitive long value of the parameter.public PrimitiveParameter(short p_value)
short
value for a parameter of the specified class.
p_value - the primitive short value of the parameter.| Method Detail |
|---|
public String toString()
String representation of the object.
toString in class ObjectString representation of the object, of the format
PrimitiveParameter(value).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||