Package: groovy.lang

## [Java] Class MetaArrayLengthProperty

- groovy.lang.MetaArrayLengthProperty

-     public class MetaArrayLengthProperty
      extends MetaProperty

  Represents the length property of an array

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class MetaProperty` | `PROPERTY_SET_PREFIX, name, type`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MetaArrayLengthProperty()` Sole constructor setting name to "length" and type to int

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `getProperty(Object object)` Get this property from the given object.
    `` | `public void` | `setProperty(Object object, Object newValue)` Sets the property on the given object to the new value

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class MetaProperty` | `getGetterName, getModifiers, getName, getProperty, getSetterName, getType, setProperty`

- - ### Constructor Detail

    - #### public MetaArrayLengthProperty()

      Sole constructor setting name to "length" and type to int

  - ### Method Detail

    - #### @Override public Object getProperty(Object object)

      Get this property from the given object.

      throws:
        IllegalArgumentException if object is not an array
      Parameters:
        `object` - an array
      Returns:
        the length of the array object

    - #### @Override public void setProperty(Object object, Object newValue)

      Sets the property on the given object to the new value

      throws:
        RuntimeException if the property could not be set
      Parameters:
        `object` - on which to set the property
        `newValue` - the new value of the property