Top Fields Constructors Methods
org.codehaus.groovy.reflection

public Class ParameterTypes

extends Object
Class Inheritance
Known Direct Subclasses
groovy.lang.MetaMethod, org.codehaus.groovy.reflection.CachedConstructor
Imports
org.codehaus.groovy.GroovyBugError, org.codehaus.groovy.runtime.MetaClassHelper, org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation, org.codehaus.groovy.runtime.wrappers.Wrapper, java.lang.reflect.Array

Field Summary

Modifier and TypeField and Description
protected boolean
protected volatile Class<T>[]
private static final Class<T>[]
protected volatile CachedClass[]

Constructor Summary

AccessConstructor and Description
public
public
public
public
ParameterTypes(CachedClass[] parameterTypes)

Method Summary

Modifier and TypeMethod and Description
public final Object[]
public Object[]
correctArguments(Object[] argumentArray)

private static Object[]
fitToVargs(Object[]
the arguments used to call the method
argumentArrayOrig
,
CachedClass[]
the types of the parameters the method takes
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.

private static Class<T>
public Class<T>[]
private synchronized void
private synchronized void
public CachedClass[]
protected Class<T>[]
private static boolean
isValidExactMethod(Class<T>[] arguments, CachedClass[] pt)

public boolean
public boolean
public boolean
isValidMethod(Class<T>[] arguments)

public boolean
isValidMethod(Object[] arguments)

private static boolean
isValidVarargsMethod(Class<T>[] arguments, int size, CachedClass[] pt, int paramMinus1)

public boolean
public boolean
isVargsMethod(Object[] arguments)

private static Object
makeCommonArray(Object[] arguments, int offset, Class<T> baseClass)

protected final void
private static boolean
testComponentAssignable(Class<T> toTestAgainst, Class<T> toTest)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isVargsMethodback to summary
protected boolean isVargsMethod
nativeParamTypesback to summary
protected volatile Class<T>[] nativeParamTypes
NO_PARAMETERSback to summary
private static final Class<T>[] NO_PARAMETERS
parameterTypesback to summary
protected volatile CachedClass[] parameterTypes

Constructor Detail

ParameterTypesback to summary
public ParameterTypes()
ParameterTypesback to summary
public ParameterTypes(Class<T>[] pt)
ParameterTypesback to summary
public ParameterTypes(String[] pt)
ParameterTypesback to summary
public ParameterTypes(CachedClass[] parameterTypes)

Method Detail

coerceArgumentsToClassesback to summary
public final Object[] coerceArgumentsToClasses(Object[] argumentArray)
correctArgumentsback to summary
public Object[] correctArguments(Object[] argumentArray)
fitToVargsback to summary
private static Object[] fitToVargs(Object[] argumentArrayOrig, 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
argumentArrayOrig:Object[]

the arguments used to call the method

paramTypes:CachedClass[]

the types of the parameters the method takes

getArgClassback to summary
private static Class<T> getArgClass(Object arg)
getNativeParameterTypesback to summary
public Class<T>[] getNativeParameterTypes()
getNativeParameterTypes0back to summary
private synchronized void getNativeParameterTypes0()
getParametersTypes0back to summary
private synchronized void getParametersTypes0()
getParameterTypesback to summary
public CachedClass[] getParameterTypes()
getPTback to summary
protected Class<T>[] getPT()
isValidExactMethodback to summary
private static boolean isValidExactMethod(Class<T>[] arguments, CachedClass[] pt)
isValidExactMethodback to summary
public boolean isValidExactMethod(Object[] args)
isValidExactMethodback to summary
public boolean isValidExactMethod(Class<T>[] args)
isValidMethodback to summary
public boolean isValidMethod(Class<T>[] arguments)
isValidMethodback to summary
public boolean isValidMethod(Object[] arguments)
isValidVarargsMethodback to summary
private static boolean isValidVarargsMethod(Class<T>[] arguments, int size, CachedClass[] pt, int paramMinus1)
isVargsMethodback to summary
public boolean isVargsMethod()
isVargsMethodback to summary
public boolean isVargsMethod(Object[] arguments)
makeCommonArrayback to summary
private static Object makeCommonArray(Object[] arguments, int offset, Class<T> baseClass)
setParametersTypesback to summary
protected final void setParametersTypes(CachedClass[] pt)
testComponentAssignableback to summary
private static boolean testComponentAssignable(Class<T> toTestAgainst, Class<T> toTest)