Package net.bytebuddy.description.method
Class MethodList.ForLoadedMethods
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- net.bytebuddy.matcher.FilterableList.AbstractBase<S,MethodList<S>>
-
- net.bytebuddy.description.method.MethodList.AbstractBase<MethodDescription.InDefinedShape>
-
- net.bytebuddy.description.method.MethodList.ForLoadedMethods
-
- All Implemented Interfaces:
java.lang.Iterable<MethodDescription.InDefinedShape>
,java.util.Collection<MethodDescription.InDefinedShape>
,java.util.List<MethodDescription.InDefinedShape>
,MethodList<MethodDescription.InDefinedShape>
,FilterableList<MethodDescription.InDefinedShape,MethodList<MethodDescription.InDefinedShape>>
- Enclosing interface:
- MethodList<T extends MethodDescription>
public static class MethodList.ForLoadedMethods extends MethodList.AbstractBase<MethodDescription.InDefinedShape>
A method list implementation that returns all loaded byte code methods (methods and constructors) that are declared for a given type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.FilterableList
FilterableList.AbstractBase<T,S extends FilterableList<T,S>>, FilterableList.Empty<T,S extends FilterableList<T,S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.MethodList
MethodList.AbstractBase<S extends MethodDescription>, MethodList.Empty<S extends MethodDescription>, MethodList.Explicit<S extends MethodDescription>, MethodList.ForLoadedMethods, MethodList.ForTokens, MethodList.TypeSubstituting
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<? extends java.lang.reflect.Constructor<?>>
constructors
The loaded constructors that are represented by this method list.private java.util.List<? extends java.lang.reflect.Method>
methods
The loaded methods that are represented by this method list.
-
Constructor Summary
Constructors Constructor Description ForLoadedMethods(java.lang.Class<?> type)
Creates a new list for a loaded type.ForLoadedMethods(java.lang.reflect.Constructor<?>[] constructor, java.lang.reflect.Method[] method)
Creates a method list that represents the given constructors and methods in their given order.ForLoadedMethods(java.util.List<? extends java.lang.reflect.Constructor<?>> constructors, java.util.List<? extends java.lang.reflect.Method> methods)
Creates a method list that represents the given constructors and methods in their given order.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDescription.InDefinedShape
get(int index)
int
size()
-
Methods inherited from class net.bytebuddy.description.method.MethodList.AbstractBase
asDefined, asSignatureTokenList, asSignatureTokenList, asTokenList, wrap
-
Methods inherited from class net.bytebuddy.matcher.FilterableList.AbstractBase
filter, getOnly, subList
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
-
-
-
-
Field Detail
-
methods
private final java.util.List<? extends java.lang.reflect.Method> methods
The loaded methods that are represented by this method list.
-
constructors
private final java.util.List<? extends java.lang.reflect.Constructor<?>> constructors
The loaded constructors that are represented by this method list.
-
-
Constructor Detail
-
ForLoadedMethods
public ForLoadedMethods(java.lang.Class<?> type)
Creates a new list for a loaded type. Method descriptions are created on demand.- Parameters:
type
- The type to be represented by this method list.
-
ForLoadedMethods
public ForLoadedMethods(java.lang.reflect.Constructor<?>[] constructor, java.lang.reflect.Method[] method)
Creates a method list that represents the given constructors and methods in their given order. The constructors are assigned the indices before the methods.- Parameters:
constructor
- The constructors to be represented by the method list.method
- The methods to be represented by the method list.
-
ForLoadedMethods
public ForLoadedMethods(java.util.List<? extends java.lang.reflect.Constructor<?>> constructors, java.util.List<? extends java.lang.reflect.Method> methods)
Creates a method list that represents the given constructors and methods in their given order. The constructors are assigned the indices before the methods.- Parameters:
constructors
- The constructors to be represented by the method list.methods
- The methods to be represented by the method list.
-
-
Method Detail
-
get
public MethodDescription.InDefinedShape get(int index)
- Specified by:
get
in interfacejava.util.List<MethodDescription.InDefinedShape>
- Specified by:
get
in classjava.util.AbstractList<MethodDescription.InDefinedShape>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<MethodDescription.InDefinedShape>
- Specified by:
size
in interfacejava.util.List<MethodDescription.InDefinedShape>
- Specified by:
size
in classjava.util.AbstractCollection<MethodDescription.InDefinedShape>
-
-