Package org.codehaus.groovy.reflection.stdclasses

# 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​(Class klazz, ClassInfo classInfo)` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `Object` | `coerceArgument​(Object argument)` |
  `static Object` | `coerceToSAM​(Closure argument, Method method, Class clazz)` |
  `static Object` | `coerceToSAM​(Closure argument, Method method, Class clazz, boolean isInterface)` |
  `static Method` | `getSAMMethod​(Class<?> c)` | returns the abstract method from a SAM type, if it is a SAM type.
  `boolean` | `isAssignableFrom​(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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CachedSAMClass

    public CachedSAMClass​(Class klazz, ClassInfo classInfo)

- ## Method Details

  - ### isAssignableFrom

    public boolean isAssignableFrom​(Class argument)
    Overrides:
      `isAssignableFrom` in class `CachedClass`

  - ### coerceToSAM

    public static Object coerceToSAM​(Closure argument, Method method, Class clazz)

  - ### coerceToSAM

    public static Object coerceToSAM​(Closure argument, Method method, Class clazz, boolean isInterface)

  - ### coerceArgument

    public Object coerceArgument​(Object argument)
    Overrides:
      `coerceArgument` in class `CachedClass`

  - ### getSAMMethod

    public static Method getSAMMethod​(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