Package org.codehaus.groovy.runtime
Class GroovyCategorySupport.CategoryMethodList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<GroovyCategorySupport.CategoryMethod>
org.codehaus.groovy.runtime.GroovyCategorySupport.CategoryMethodList
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<GroovyCategorySupport.CategoryMethod>,Collection<GroovyCategorySupport.CategoryMethod>,List<GroovyCategorySupport.CategoryMethod>,RandomAccess
- Enclosing class:
- GroovyCategorySupport
public static class GroovyCategorySupport.CategoryMethodList
extends ArrayList<GroovyCategorySupport.CategoryMethod>
Category methods that share one name at a single
use
nesting level. A deeper level copies the methods from the
previous level and shares its usage counter. Adding a method
increments that counter.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intNesting depth of theusescope that installed this list.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionCategoryMethodList(String name, int level, GroovyCategorySupport.CategoryMethodList previous) Builds the list fornameatlevel. -
Method Summary
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Field Details
-
level
public final int levelNesting depth of theusescope that installed this list.
-
-
Constructor Details
-
CategoryMethodList
public CategoryMethodList(String name, int level, GroovyCategorySupport.CategoryMethodList previous) Builds the list fornameatlevel. Whenpreviousis present its methods are copied and its usage counter is shared; otherwise a counter is taken forname.- Parameters:
name- method name, used to find the usage counter whenpreviousis nulllevel- scope depth that owns this listprevious- list from the surrounding scope, or null for the outermost scope
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<GroovyCategorySupport.CategoryMethod>- Specified by:
addin interfaceList<GroovyCategorySupport.CategoryMethod>- Overrides:
addin classArrayList<GroovyCategorySupport.CategoryMethod>
-