Package: groovy.lang

## [Java] Class MetaArrayLengthProperty

- groovy.lang.MetaArrayLengthProperty

- Represents the length property of an array

  Authors:
    James Strachan

- - 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
    --- | --- | ---
    `` | `Object` | `getProperty(Object object)` Get this property from the given object.
    `` | `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`
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### public MetaArrayLengthProperty()

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

  - ### Method Detail

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

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