Class CachedSAMClass
- java.lang.Object
-
- org.codehaus.groovy.reflection.CachedClass
-
- org.codehaus.groovy.reflection.stdclasses.CachedSAMClass
-
public class CachedSAMClass extends CachedClass
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.codehaus.groovy.reflection.CachedClass
CachedClass.CachedMethodComparatorByName, CachedClass.CachedMethodComparatorWithString
-
-
Field Summary
-
Fields inherited from class org.codehaus.groovy.reflection.CachedClass
classInfo, EMPTY_ARRAY, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods
-
-
Constructor Summary
Constructors Constructor Description CachedSAMClass(java.lang.Class klazz, ClassInfo classInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectcoerceArgument(java.lang.Object argument)static java.lang.ObjectcoerceToSAM(Closure argument, java.lang.reflect.Method method, java.lang.Class clazz, boolean isInterface)static java.lang.reflect.MethodgetSAMMethod(java.lang.Class<?> c)returns the abstract method from a SAM type, if it is a SAM type.booleanisAssignableFrom(java.lang.Class argument)-
Methods inherited from class org.codehaus.groovy.reflection.CachedClass
addNewMopMethods, getCachedClass, getCachedSuperClass, getCallSiteLoader, getConstructors, getDeclaredInterfaces, getFields, getHierarchy, getInterfaces, getMethods, getModifiers, getName, getNewMetaMethods, getSuperClassDistance, getTheClass, getTypeDescription, hashCode, isDirectlyAssignable, isInterface, isPrimitive, isVoid, searchMethods, setNewMopMethods, toString
-
-
-
-
Constructor Detail
-
CachedSAMClass
public CachedSAMClass(java.lang.Class klazz, ClassInfo classInfo)
-
-
Method Detail
-
isAssignableFrom
public boolean isAssignableFrom(java.lang.Class argument)
- Overrides:
isAssignableFromin classCachedClass
-
coerceToSAM
public static java.lang.Object coerceToSAM(Closure argument, java.lang.reflect.Method method, java.lang.Class clazz, boolean isInterface)
-
coerceArgument
public java.lang.Object coerceArgument(java.lang.Object argument)
- Overrides:
coerceArgumentin classCachedClass
-
getSAMMethod
public static java.lang.reflect.Method getSAMMethod(java.lang.Class<?> c)
returns the abstract method from a SAM type, if it is a SAM type.- Parameters:
c- the SAM class- Returns:
- null if nothing was found, the method otherwise
-
-