Package net.bytebuddy.description.method
Interface MethodList<T extends MethodDescription>
- Type Parameters:
T
- The type of method descriptions represented by this list.
- All Superinterfaces:
Collection<T>
,FilterableList<T,
,MethodList<T>> Iterable<T>
,List<T>
,SequencedCollection<T>
- All Known Implementing Classes:
MethodList.AbstractBase
,MethodList.Empty
,MethodList.Explicit
,MethodList.ForLoadedMethods
,MethodList.ForTokens
,MethodList.TypeSubstituting
,TypePool.Default.LazyTypeDescription.MethodTokenList
Implementations represent a list of method descriptions.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
MethodList.AbstractBase<S extends MethodDescription>
A base implementation of aMethodList
.static class
MethodList.Empty<S extends MethodDescription>
An implementation of an empty method list.static class
MethodList.Explicit<S extends MethodDescription>
A method list that is a wrapper for a given list of method descriptions.static class
A method list implementation that returns all loaded byte code methods (methods and constructors) that are declared for a given type.static class
A list of method descriptions for a list of detached tokens.static class
A list of method descriptions that yieldsMethodDescription.TypeSubstituting
. -
Method Summary
Modifier and TypeMethodDescriptionReturns this list of these method descriptions resolved to their defined shape.Returns a list of signature tokens for this list of methods.asSignatureTokenList
(ElementMatcher<? super TypeDescription> matcher, TypeDescription typeDescription) Returns a list of signature tokens for this list of methods.asTokenList
(ElementMatcher<? super TypeDescription> matcher) Transforms the list of method descriptions into a list of detached tokens.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface net.bytebuddy.matcher.FilterableList
filter, getOnly, subList
Methods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, toArray, toArray
-
Method Details
-
asTokenList
ByteCodeElement.Token.TokenList<MethodDescription.Token> asTokenList(ElementMatcher<? super TypeDescription> matcher) Transforms the list of method descriptions into a list of detached tokens. All types that are matched by the provided target type matcher are substituted byTargetType
.- Parameters:
matcher
- A matcher that indicates type substitution.- Returns:
- The transformed token list.
-
asSignatureTokenList
List<MethodDescription.SignatureToken> asSignatureTokenList()Returns a list of signature tokens for this list of methods.- Returns:
- A list of signature tokens for this list of methods.
-
asSignatureTokenList
List<MethodDescription.SignatureToken> asSignatureTokenList(ElementMatcher<? super TypeDescription> matcher, TypeDescription typeDescription) Returns a list of signature tokens for this list of methods.- Parameters:
matcher
- A matcher for resolving methods toMethodDescription.Token
s.typeDescription
- The type description to resolve theMethodDescription.SignatureToken
s to.- Returns:
- A list of signature tokens for this list of methods.
-
asDefined
MethodList<MethodDescription.InDefinedShape> asDefined()Returns this list of these method descriptions resolved to their defined shape.- Returns:
- A list of methods in their defined shape.
-