Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class DefaultMetaClassInfo

- org.codehaus.groovy.runtime.metaclass.DefaultMetaClassInfo

-     public class DefaultMetaClassInfo
      extends Object

  WARNING: This class is for internal use only! We use this class to store information about if a default MetaClass is used for certain primitives.

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `DefaultMetaClassInfo.ConstantMetaClassVersioning` | Represents a constant version of the metaclass configuration at a point in time.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static boolean` | `disabledStandardMetaClass()` Returns whether standard metaclass functionality has been disabled.
    `` | `public static DefaultMetaClassInfo.ConstantMetaClassVersioning` | `getCurrentConstantMetaClassVersioning()` Retrieves the current constant metaclass versioning object.
    `` | `public static DefaultMetaClassInfo.ConstantMetaClassVersioning` | `getNewConstantMetaClassVersioning()` Creates a new constant metaclass versioning instance and invalidates the old one.
    `` | `public static boolean` | `isOrigBool()` Returns true if no metaclass creation handle is set and if the original boolean metaclass is used.
    `` | `public static boolean` | `isOrigByte()` Returns true if no metaclass creation handle is set and if the original byte metaclass is used.
    `` | `public static boolean` | `isOrigChar()` Returns true if no metaclass creation handle is set and if the original char metaclass is used.
    `` | `public static boolean` | `isOrigDouble()` Returns true if no metaclass creation handle is set and if the original double metaclass is used.
    `` | `public static boolean` | `isOrigFloat()` Returns true if no metaclass creation handle is set and if the original float metaclass is used.
    `` | `public static boolean` | `isOrigInt()` Returns true if no metaclass creation handle is set and if the original integer metaclass is used.
    `` | `public static boolean` | `isOrigIntArray()` Returns true if no metaclass creation handle is set and if the original integer array metaclass is used.
    `` | `public static boolean` | `isOrigLong()` Returns true if no metaclass creation handle is set and if the original long metaclass is used.
    `` | `public static boolean` | `isOrigShort()` Returns true if no metaclass creation handle is set and if the original short metaclass is used.
    `` | `public static void` | `setCategoryUsed(boolean b)` Sets whether categories are currently in use and updates related flags accordingly.
    `` | `public static void` | `setOrigBool(boolean v)` Sets if the original boolean metaclass is used.
    `` | `public static void` | `setOrigByte(boolean v)` Sets if the original byte metaclass is used.
    `` | `public static void` | `setOrigChar(boolean v)` Sets if the original char metaclass is used.
    `` | `public static void` | `setOrigDouble(boolean v)` Sets if the original double metaclass is used.
    `` | `public static void` | `setOrigFloat(boolean v)` Sets if the original float metaclass is used.
    `` | `public static void` | `setOrigInt(boolean v)` Sets if the original int metaclass is used.
    `` | `public static void` | `setOrigIntArray(boolean v)` Sets if the original int array metaclass is used.
    `` | `public static void` | `setOrigLong(boolean v)` Sets if the original long metaclass is used.
    `` | `public static void` | `setOrigShort(boolean v)` Sets if the original short metaclass is used.
    `` | `public static void` | `setPrimitiveMeta(Class c, boolean orig)` Sets whether the original metaclass is used for the given primitive class.
    `` | `public static void` | `setWithoutCustomMetaclassCreationHandle(boolean mch)` Sets whether the system uses a custom metaclass creation handle.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public static boolean disabledStandardMetaClass()

      Returns whether standard metaclass functionality has been disabled. This occurs when either categories are in use or a custom metaclass creation handle is set.

      Returns:
        true if standard metaclass is disabled, false otherwise

    - #### public static DefaultMetaClassInfo.ConstantMetaClassVersioning getCurrentConstantMetaClassVersioning()

      Retrieves the current constant metaclass versioning object. All cached metaclass information is tagged with the current version. When the version changes, all caches using the old version become invalid.

      Returns:
        the current metaclass versioning instance

    - #### public static DefaultMetaClassInfo.ConstantMetaClassVersioning getNewConstantMetaClassVersioning()

      Creates a new constant metaclass versioning instance and invalidates the old one. This should be called when global metaclass configuration changes occur.

      Returns:
        the new metaclass versioning instance

    - #### public static boolean isOrigBool()

      Returns true if no metaclass creation handle is set and if the original boolean metaclass is used.

    - #### public static boolean isOrigByte()

      Returns true if no metaclass creation handle is set and if the original byte metaclass is used.

    - #### public static boolean isOrigChar()

      Returns true if no metaclass creation handle is set and if the original char metaclass is used.

    - #### public static boolean isOrigDouble()

      Returns true if no metaclass creation handle is set and if the original double metaclass is used.

    - #### public static boolean isOrigFloat()

      Returns true if no metaclass creation handle is set and if the original float metaclass is used.

    - #### public static boolean isOrigInt()

      Returns true if no metaclass creation handle is set and if the original integer metaclass is used.

    - #### public static boolean isOrigIntArray()

      Returns true if no metaclass creation handle is set and if the original integer array metaclass is used.

    - #### public static boolean isOrigLong()

      Returns true if no metaclass creation handle is set and if the original long metaclass is used.

    - #### public static boolean isOrigShort()

      Returns true if no metaclass creation handle is set and if the original short metaclass is used.

    - #### public static void setCategoryUsed(boolean b)

      Sets whether categories are currently in use and updates related flags accordingly. When categories are used, standard metaclass functionality may be affected.

      Parameters:
        `b` - true if categories are in use, false otherwise

    - #### public static void setOrigBool(boolean v)

      Sets if the original boolean metaclass is used.

    - #### public static void setOrigByte(boolean v)

      Sets if the original byte metaclass is used.

    - #### public static void setOrigChar(boolean v)

      Sets if the original char metaclass is used.

    - #### public static void setOrigDouble(boolean v)

      Sets if the original double metaclass is used.

    - #### public static void setOrigFloat(boolean v)

      Sets if the original float metaclass is used.

    - #### public static void setOrigInt(boolean v)

      Sets if the original int metaclass is used.

    - #### public static void setOrigIntArray(boolean v)

      Sets if the original int array metaclass is used.

    - #### public static void setOrigLong(boolean v)

      Sets if the original long metaclass is used.

    - #### public static void setOrigShort(boolean v)

      Sets if the original short metaclass is used.

    - #### public static void setPrimitiveMeta(Class c, boolean orig)

      Sets whether the original metaclass is used for the given primitive class. This method updates the appropriate flag based on the class type (Byte, Character, Short, Integer, Long, Float, Double, or Integer array).

      Parameters:
        `c` - the primitive or primitive array class
        `orig` - true if using the original metaclass, false otherwise

    - #### public static void setWithoutCustomMetaclassCreationHandle(boolean mch)

      Sets whether the system uses a custom metaclass creation handle. When set to false, indicates that a custom handle is in use; when set to true, indicates the system uses the standard metaclass creation handle.

      Parameters:
        `mch` - true if using standard metaclass creation handle, false if using custom