Class ArrayMetaMethod
java.lang.Object
org.codehaus.groovy.reflection.ParameterTypes
groovy.lang.MetaMethod
org.codehaus.groovy.runtime.dgmimpl.arrays.ArrayMetaMethod
- All Implemented Interfaces:
MetaMember,Cloneable
- Direct Known Subclasses:
ArrayGetAtMetaMethod,ArrayPutAtMetaMethod
Shared meta-method base for array
getAt and putAt.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final CachedClassprotected static final CachedClass[]One-element parameter list containingINTEGER_CLASS.Fields inherited from class groovy.lang.MetaMethod
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the modifiers of this method.protected static intnormaliseIndex(int i, int size) Maps a negative index from the end of the array.Methods inherited from class groovy.lang.MetaMethod
checkParameters, clone, doMethodInvoke, equal, equal, getDeclaringClass, getDescriptor, getMopName, getName, getReturnType, getSignature, invoke, isAbstract, isCacheable, isDefault, isMethod, isSame, processDoMethodInvokeException, toStringMethods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, getPT, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface groovy.lang.MetaMember
isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic
-
Field Details
-
INTEGER_CLASS
-
INTEGER_CLASS_ARR
One-element parameter list containingINTEGER_CLASS.
-
-
Constructor Details
-
ArrayMetaMethod
public ArrayMetaMethod()
-
-
Method Details
-
normaliseIndex
protected static int normaliseIndex(int i, int size) Maps a negative index from the end of the array. An index that is still negative after addingsizeis rejected. A non-negative index is returned unchanged, even when it is past the end.- Parameters:
i- the requested index, which may be negativesize- the array length added to a negative index- Returns:
iwheniis non-negative, otherwisei + size
-
getModifiers
public int getModifiers()Description copied from class:MetaMethodReturns the modifiers of this method.- Specified by:
getModifiersin interfaceMetaMember- Specified by:
getModifiersin classMetaMethod- Returns:
- modifiers as an int.
-