Top Description Fields Constructors Methods
groovy.lang

public Class MetaArrayLengthProperty

extends MetaProperty
Class Inheritance

Represents the length property of an array

Field Summary

Inherited from groovy.lang.MetaProperty:
namePROPERTY_SET_PREFIXtype

Constructor Summary

AccessConstructor and Description
public
MetaArrayLengthProperty()

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

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the length of the array object
getProperty
(Object
an array
object
)

Implements abstract groovy.lang.MetaProperty.getProperty.

Get this property from the given object.
public void
setProperty(Object
on which to set the property
object
,
Object
the new value of the property
newValue
)

Implements abstract groovy.lang.MetaProperty.setProperty.

Sets the property on the given object to the new value
Inherited from groovy.lang.MetaProperty:
getGetterNamegetModifiersgetNamegetSetterNamegetType

Constructor Detail

MetaArrayLengthPropertyback to summary
public MetaArrayLengthProperty()

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

Method Detail

getPropertyback to summary
public Object getProperty(Object object)

Implements abstract groovy.lang.MetaProperty.getProperty.

Get this property from the given object.

Parameters
object:Object

an array

Returns:Object

the length of the array object

Exceptions
IllegalArgumentException:
if object is not an array
setPropertyback to summary
public void setProperty(Object object, Object newValue)

Implements abstract groovy.lang.MetaProperty.setProperty.

Sets the property on the given object to the new value

Parameters
object:Object

on which to set the property

newValue:Object

the new value of the property

Exceptions
RuntimeException:
if the property could not be set