Package: org.grails.encoder

## [Groovy] Class CodecMetaClassSupport

- org.grails.encoder.CodecMetaClassSupport

-     class CodecMetaClassSupport
      extends java.lang.Object

  Helper methods for Codec metaclass operations.

  Authors:
    Lari Hotari
  Since:
    2.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.String` | `DECODE_PREFIX` |
    `private static java.lang.Object[]` | `EMPTY_ARGS` |
    `private static java.lang.String` | `ENCODE_AS_PREFIX` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static java.lang.String` | `DECODE_PREFIX`
    `static java.lang.Object[]` | `EMPTY_ARGS`
    `static java.lang.String` | `ENCODE_AS_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CodecMetaClassSupport ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private java.lang.Object` | `addAliasMetaMethods(java.util.List<groovy.lang.ExpandoMetaClass> targetMetaClasses, java.util.Set<java.lang.String> aliases, groovy.lang.Closure<java.lang.String> methodNameClosure, groovy.lang.Closure methodClosure)`
    `` | `protected void` | `addMetaMethod(java.util.List<groovy.lang.ExpandoMetaClass> targetMetaClasses, java.lang.String methodName, groovy.lang.Closure closure)`
    `` | `void` | `configureCodecMethods(CodecFactory codecFactory, boolean cacheLookup, java.util.List<groovy.lang.ExpandoMetaClass> targetMetaClasses)` Adds "encodeAs*" and "decode*" metamethods for given codecClass
    `` | `private static java.lang.Object` | `filterNullObject(java.lang.Object delegate)` returns given parameter if it's not a Groovy NullObject (and is not null)
    `` | `private java.lang.String` | `resolveCodecName(CodecFactory codecFactory)`
    `` | `private static java.util.List<groovy.lang.ExpandoMetaClass>` | `resolveDefaultMetaClasses()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private static final java.lang.String DECODE_PREFIX

    - #### private static final java.lang.Object[] EMPTY_ARGS

    - #### private static final java.lang.String ENCODE_AS_PREFIX

  - ### Property Detail

    - #### static final java.lang.String DECODE_PREFIX

    - #### static final java.lang.Object[] EMPTY_ARGS

    - #### static final java.lang.String ENCODE_AS_PREFIX

  - ### Constructor Detail

    - #### CodecMetaClassSupport()

  - ### Method Detail

    - #### @groovy.transform.CompileStatic private java.lang.Object addAliasMetaMethods(java.util.List<groovy.lang.ExpandoMetaClass> targetMetaClasses, java.util.Set<java.lang.String> aliases, groovy.lang.Closure<java.lang.String> methodNameClosure, groovy.lang.Closure methodClosure)

    - #### protected void addMetaMethod(java.util.List<groovy.lang.ExpandoMetaClass> targetMetaClasses, java.lang.String methodName, groovy.lang.Closure closure)

    - #### @groovy.transform.CompileStatic void configureCodecMethods(CodecFactory codecFactory, boolean cacheLookup, java.util.List<groovy.lang.ExpandoMetaClass> targetMetaClasses)

      Adds "encodeAs*" and "decode*" metamethods for given codecClass

      Parameters:
        `codecClass` - the codec class

    - #### @groovy.transform.CompileStatic private static java.lang.Object filterNullObject(java.lang.Object delegate)

      returns given parameter if it's not a Groovy NullObject (and is not null) The check is made by looking at the Object's class, since NullObject.is & equals give wrong results (Groovy bug?). A NullObject get's passed to the closure in delegate perhaps because of a Groovy bug or feature This happens when a NullObject's MetaMethod is called. @return

      Parameters:
        delegate

    - #### private java.lang.String resolveCodecName(CodecFactory codecFactory)

    - #### private static java.util.List<groovy.lang.ExpandoMetaClass> resolveDefaultMetaClasses()