org.codehaus.groovy.reflection
Class ParameterTypes
java.lang.Object
org.codehaus.groovy.reflection.ParameterTypes
- Direct Known Subclasses:
- CachedConstructor, MetaMethod
public class ParameterTypes
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nativeParamTypes
protected volatile java.lang.Class[] nativeParamTypes
parameterTypes
protected volatile CachedClass[] parameterTypes
isVargsMethod
protected boolean isVargsMethod
ParameterTypes
public ParameterTypes()
ParameterTypes
public ParameterTypes(java.lang.Class[] pt)
ParameterTypes
public ParameterTypes(java.lang.String[] pt)
ParameterTypes
public ParameterTypes(CachedClass[] parameterTypes)
setParametersTypes
protected final void setParametersTypes(CachedClass[] pt)
getParameterTypes
public CachedClass[] getParameterTypes()
getParametersTypes0
private void getParametersTypes0()
getNativeParameterTypes
public java.lang.Class[] getNativeParameterTypes()
getNativeParameterTypes0
private void getNativeParameterTypes0()
getPT
protected java.lang.Class[] getPT()
isVargsMethod
public boolean isVargsMethod(java.lang.Object[] arguments)
coerceArgumentsToClasses
public final java.lang.Object[] coerceArgumentsToClasses(java.lang.Object[] argumentArray)
correctArguments
private java.lang.Object[] correctArguments(java.lang.Object[] argumentArray)
fitToVargs
private static java.lang.Object[] fitToVargs(java.lang.Object[] argumentArray,
CachedClass[] paramTypes)
- this method is called when the number of arguments to a method is greater than 1
and if the method is a vargs method. This method will then transform the given
arguments to make the method callable
- Parameters:
argumentArray
- the arguments used to call the methodparamTypes
- the types of the paramters the method takes
isValidMethod
public boolean isValidMethod(java.lang.Class[] arguments)
isValidExactMethod
private boolean isValidExactMethod(java.lang.Class[] arguments,
int size,
CachedClass[] pt)
isValidVarargsMethod
private boolean isValidVarargsMethod(java.lang.Class[] arguments,
int size,
CachedClass[] pt,
int paramMinus1)
isValidMethod
public boolean isValidMethod(java.lang.Object[] arguments)
getArgClass
private java.lang.Class getArgClass(java.lang.Object arg)
Copyright © ${year} The Codehaus. All Rights Reserved.