CachedSAMClass (groovy 2.4.5 API)
Date: 2015-09-17

Package: org.codehaus.groovy.reflection.stdclasses

## [Java] Class CachedSAMClass

- org.codehaus.groovy.reflection.stdclasses.CachedSAMClass

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class CachedClass` | `EMPTY_ARRAY, classInfo, isArray, isInterface, isNumber, isPrimitive, modifiers, mopMethods`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CachedSAMClass (Class klazz, ClassInfo classInfo)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `Object` | `coerceArgument(Object argument)`
    `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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CachedClass` | `addNewMopMethods, coerceArgument, getCachedClass, getCachedSuperClass, getCallSiteLoader, getConstructors, getDeclaredInterfaces, getFields, getHierarchy, getInterfaces, getMethods, getModifiers, getName, getNewMetaMethods, getSuperClassDistance, getTheClass, getTypeDescription, hashCode, isAssignableFrom, isDirectlyAssignable, isInterface, isPrimitive, isVoid, searchMethods, setNewMopMethods, toString`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public CachedSAMClass(Class klazz, ClassInfo classInfo)

  - ### Method Detail

    - #### @Override public Object coerceArgument(Object argument)

    - #### @SuppressWarnings("unchecked") public static Object coerceToSAM(Closure argument, Method method, Class clazz, boolean isInterface)

    - #### 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

    - #### @Override public boolean isAssignableFrom(Class argument)