public class DefaultedComMethod extends Object
ComMethod
that calls default methods.
This is used so that the user can do foo()
whereas the real COM method invocation goes like
foo().bar().zot()
.
Modifier and Type | Field and Description |
---|---|
protected int[] |
defaultParameterIndex
The parameter indexes of default parameters.
|
protected Object[] |
defaultParameters
The array of default parameters of the COM methods
|
protected Method |
method
The Java method that corresponds to the native COM method
|
Constructor and Description |
---|
DefaultedComMethod(Method m,
ReturnValue retVal) |
Modifier and Type | Method and Description |
---|---|
protected void |
generateDefaultParameters(UseDefaultValues defValues)
Generates the default values for this ComMethod using the given
UseDefaultValues annotation |
protected void |
messageParameters(Object[] args)
Converts the parameters to be more native friendly.
|
protected final Method method
protected final Object[] defaultParameters
defaultParameterIndex
protected final int[] defaultParameterIndex
defaultParameters
defaultParameterIndex = {2, 4}; defaultParameters = {new Integer(3), "Hello"};In this example the second parameter of the
ComMethod
has a default value of new Integer(3)
and the
forth parameter has a default value of "Hello".
defaultParameters
public DefaultedComMethod(Method m, ReturnValue retVal)
protected void messageParameters(Object[] args)
args
- the array of objects to be converted.protected void generateDefaultParameters(UseDefaultValues defValues)
UseDefaultValues
annotationdefValues
- the annotation containing the information to generate the default values.Copyright © 2014. All rights reserved.