|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.runtime.MetaClassHelper
public class MetaClassHelper extends Object
Field Summary | |
---|---|
static Object[] |
ARRAY_WITH_NULL
|
static Object[] |
EMPTY_ARRAY
|
static Class[] |
EMPTY_CLASS_ARRAY
|
static Class[] |
EMPTY_TYPE_ARRAY
|
protected static Logger |
LOG
|
Method Summary | |
---|---|
static boolean
|
accessibleToConstructor(Class at, Constructor constructor)
|
static Object
|
asPrimitiveArray(List list, Class parameterType)
@param list the original list |
static Object[]
|
asWrapperArray(Object parameters, Class componentType)
|
static long
|
calculateParameterDistance(Class[] arguments, ParameterTypes pt)
|
static String
|
capitalize(String property)
In general we want to match the signature that allows us to use as less arguments for the vargs part as possible. |
static Class[]
|
castArgumentsToClassArray(Object[] argTypes)
|
static Object
|
chooseEmptyMethodParams(FastArray methods)
|
static Object
|
chooseMostGeneralMethodWith1NullParam(FastArray methods)
|
static boolean
|
containsMatchingMethod(List list, MetaMethod method)
|
static Class[]
|
convertToTypeArray(Object[] args)
|
static GroovyRuntimeException
|
createExceptionText(String init, MetaMethod method, Object object, Object[] args, Throwable reason, boolean setReason)
|
static void
|
doSetMetaClass(Object self, MetaClass mc)
|
protected static String
|
getClassName(Object object)
|
static Closure
|
getMethodPointer(Object object, String methodName)
|
static boolean
|
isAssignableFrom(Class classToTransformTo, Class classToTransformFrom)
|
static boolean
|
isGenericSetMethod(MetaMethod method)
|
protected static boolean
|
isSuperclass(Class clazz, Class superclass)
|
static void
|
logMethodCall(Object object, String methodName, Object[] arguments)
|
static Object
|
makeArray(Object obj, Class secondary, int length)
|
static Object
|
makeCommonArray(Object[] arguments, int offset, Class fallback)
|
protected static String
|
normalizedValue(Object argument)
|
static boolean
|
parametersAreCompatible(Class[] arguments, Class[] parameters)
|
static boolean
|
sameClass(Class[] params, Object arg)
|
static boolean
|
sameClasses(Class[] params, Object[] arguments, boolean weakNullCheck)
|
static boolean
|
sameClasses(Class[] params, Object[] arguments)
|
static boolean
|
sameClasses(Class[] params)
|
static boolean
|
sameClasses(Class[] params, Object arg1)
|
static boolean
|
sameClasses(Class[] params, Object arg1, Object arg2)
|
static boolean
|
sameClasses(Class[] params, Object arg1, Object arg2, Object arg3)
|
static boolean
|
sameClasses(Class[] params, Object arg1, Object arg2, Object arg3, Object arg4)
|
protected static String
|
shortName(Object object)
|
static void
|
unwrap(Object[] arguments)
|
static Class[]
|
wrap(Class[] classes)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
public static final Object[] ARRAY_WITH_NULL
public static final Object[] EMPTY_ARRAY
public static final Class[] EMPTY_CLASS_ARRAY
public static final Class[] EMPTY_TYPE_ARRAY
protected static final Logger LOG
Method Detail |
---|
public static boolean accessibleToConstructor(Class at, Constructor constructor)
public static Object asPrimitiveArray(List list, Class parameterType)
list
- the original listparameterType
- the resulting array type
public static Object[] asWrapperArray(Object parameters, Class componentType)
public static long calculateParameterDistance(Class[] arguments, ParameterTypes pt)
public static String capitalize(String property)
public static Class[] castArgumentsToClassArray(Object[] argTypes)
public static Object chooseEmptyMethodParams(FastArray methods)
public static Object chooseMostGeneralMethodWith1NullParam(FastArray methods)
public static boolean containsMatchingMethod(List list, MetaMethod method)
public static Class[] convertToTypeArray(Object[] args)
public static GroovyRuntimeException createExceptionText(String init, MetaMethod method, Object object, Object[] args, Throwable reason, boolean setReason)
public static void doSetMetaClass(Object self, MetaClass mc)
protected static String getClassName(Object object)
public static Closure getMethodPointer(Object object, String methodName)
public static boolean isAssignableFrom(Class classToTransformTo, Class classToTransformFrom)
public static boolean isGenericSetMethod(MetaMethod method)
protected static boolean isSuperclass(Class clazz, Class superclass)
public static void logMethodCall(Object object, String methodName, Object[] arguments)
public static Object makeArray(Object obj, Class secondary, int length)
public static Object makeCommonArray(Object[] arguments, int offset, Class fallback)
protected static String normalizedValue(Object argument)
public static boolean parametersAreCompatible(Class[] arguments, Class[] parameters)
public static boolean sameClass(Class[] params, Object arg)
public static boolean sameClasses(Class[] params, Object[] arguments, boolean weakNullCheck)
public static boolean sameClasses(Class[] params, Object[] arguments)
public static boolean sameClasses(Class[] params)
public static boolean sameClasses(Class[] params, Object arg1)
public static boolean sameClasses(Class[] params, Object arg1, Object arg2)
public static boolean sameClasses(Class[] params, Object arg1, Object arg2, Object arg3)
public static boolean sameClasses(Class[] params, Object arg1, Object arg2, Object arg3, Object arg4)
protected static String shortName(Object object)
public static void unwrap(Object[] arguments)
public static Class[] wrap(Class[] classes)
Copyright © 2003-2013 The Codehaus. All rights reserved.