FileDocCategorySizeDatePackage
ParamInfoWithPrimitives.javaAPI DocGlassfish v2 API4851Fri May 04 22:33:18 BST 2007com.sun.enterprise.admin.common

ParamInfoWithPrimitives

public class ParamInfoWithPrimitives extends ParamInfo
A specialization of ParamInfo class that can handle both primitives and Objects. With this class, callers can form signatures of any methods.

Note a limitation of this class: It is not possible to use this class to call methods like methodName(java.lang.Integer INTEGER, int integer) . i.e. to say that the methods which contain both primitives and their object counterparts are not callable using this class. The reason for this is that when specifying the value of a primitive in Object array, one has to create an instance of Object equivalent(e.g. int:java.lang.Integer, boolean:java.lang.Boolean and so on). It is not possible in Java to have Object[] params = new Object[]{10}.

Note that the names of primitives in signature will be: "int", "char", "float", "double", "byte", "short" and "long".

author
Senthil Chidambaram
version
1.0

Fields Summary
Constructors Summary
public ParamInfoWithPrimitives(String operationName, Object[] params)
Constructor takes the operationName, and an array of params object. This constructor calls the paramstoClassNames to set the signature of the params array object.

        super(operationName, params);
	
public ParamInfoWithPrimitives(String operationName, Object param)
Constructor takes the operationName, and a single param Object. This constructor calls the ParamInfo array object constructor to set the signature for the param object.

		this(operationName, new Object[]{param} );
	
public ParamInfoWithPrimitives(String operationName, Object param1, Object param2)
This constructor takes an operationName, and two param Objects. Then it calls the ParamInfo array object constructor to set the signature for the parameters.

		this(operationName, new Object[]{param1, param2});
	
public ParamInfoWithPrimitives(String operationName, Object param1, Object param2, Object param3)
This constructor takes an operationName, and three param Objects. Then it calls the ParamInfo array object constructor like other constructors to set the signature for the parameters.


		this(operationName, new Object[]{param1, param2,
                param3});
	
public ParamInfoWithPrimitives(String operationName, Object param1, Object param2, Object param3, Object param4)
This constructor takes an operationName, and four param objects. Then it calls the array object constructor to set the signature for the parameters.


		this(operationName, new Object[]{param1, param2,
                param3, param4});
	
Methods Summary
public voidinitCoercionOptions()

        mForcePrimitives = true;