Package groovy.lang
Class MetaArrayLengthProperty
java.lang.Object
groovy.lang.MetaProperty
groovy.lang.MetaArrayLengthProperty
Represents the length property of an array
- 
Field SummaryFields inherited from class groovy.lang.MetaPropertyname, PROPERTY_SET_PREFIX, type
- 
Constructor SummaryConstructorsConstructorDescriptionSole constructor setting name to "length" and type to int
- 
Method SummaryModifier and TypeMethodDescriptiongetProperty(Object object) Get this property from the given object.voidsetProperty(Object object, Object newValue) Sets the property on the given object to the new valueMethods inherited from class groovy.lang.MetaPropertygetGetterName, getModifiers, getName, getSetterName, getType
- 
Constructor Details- 
MetaArrayLengthPropertypublic MetaArrayLengthProperty()Sole constructor setting name to "length" and type to int
 
- 
- 
Method Details- 
getPropertyGet this property from the given object.- Specified by:
- getPropertyin class- MetaProperty
- Parameters:
- object- an array
- Returns:
- the length of the array object
- Throws:
- IllegalArgumentException- if object is not an array
 
- 
setPropertySets the property on the given object to the new value- Specified by:
- setPropertyin class- MetaProperty
- Parameters:
- object- on which to set the property
- newValue- the new value of the property
- Throws:
- RuntimeException- if the property could not be set
 
 
-