1 35 36 package groovy.lang; 37 38 39 45 public class MetaArrayLengthProperty extends MetaProperty { 46 47 public MetaArrayLengthProperty() { 48 super("length", int.class); 49 } 50 51 55 public Object getProperty(Object object) throws Exception { 56 return new Integer (java.lang.reflect.Array.getLength(object)); 57 } 58 59 66 public void setProperty(Object object, Object newValue) { 67 throw new ReadOnlyPropertyException("length", object.getClass()); 68 } 69 } 70 | Popular Tags |