Top Description Inners Methods
net.bytebuddy.matcher

public Interface LatentMatcher<T>

Known Direct Implementers
net.bytebuddy.matcher.LatentMatcher.ForSelfDeclaredMethod, net.bytebuddy.matcher.LatentMatcher.Resolved, net.bytebuddy.matcher.LatentMatcher.ForFieldToken, net.bytebuddy.matcher.LatentMatcher.ForMethodToken, net.bytebuddy.matcher.LatentMatcher.ForRecordComponentToken, net.bytebuddy.matcher.LatentMatcher.Conjunction, net.bytebuddy.matcher.LatentMatcher.Disjunction, net.bytebuddy.dynamic.scaffold.FieldRegistry.Default.Entry, net.bytebuddy.dynamic.scaffold.MethodRegistry.Default.Entry, net.bytebuddy.dynamic.scaffold.RecordComponentRegistry.Default.Entry, net.bytebuddy.dynamic.scaffold.inline.InliningImplementationMatcher, net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.InstrumentableMatcher
Type Parameters
<T>
The type of the matched element.
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.description.field.FieldDescription, net.bytebuddy.description.method.MethodDescription, net.bytebuddy.description.type.RecordComponentDescription, .TypeDescription, java.util.Arrays, .List

A latent matcher that resolves an ElementMatcher after supplying a type description.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LatentMatcher.Conjunction<
The type of the matched element.
S
>

A matcher that computes the conjunction of all supplied latent matchers.

public static class
LatentMatcher.Disjunction<
The type of the matched element.
S
>

A matcher that computes the disjunction of all supplied latent matchers.

public static class
LatentMatcher.ForFieldToken

A latent matcher where the field token is being attached to the supplied type description before matching.

public static class
LatentMatcher.ForMethodToken

A latent matcher where the method token is being attached to the supplied type description before matching.

public static class
LatentMatcher.ForRecordComponentToken

A latent matcher for a record component token.

public static enum
LatentMatcher.ForSelfDeclaredMethod

A latent matching methods that are declared by the resolved type.

public static class
LatentMatcher.Resolved<
The type of the matched element.
S
>

A latent matcher representing an already resolved ElementMatcher.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super T>

Returns:

An ElementMatcher that represents this matcher's resolved form.
resolve
(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Resolves the element matcher this instance represents for the supplied type description.

Method Detail

resolveback to summary
public ElementMatcher<? super T> resolve(TypeDescription typeDescription)

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super T>

An ElementMatcher that represents this matcher's resolved form.

net.bytebuddy.matcher back to summary

public Class LatentMatcher.Conjunction<S>

extends Object
implements LatentMatcher<S>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance
Type Parameters
<S>
The type of the matched element.

A matcher that computes the conjunction of all supplied latent matchers.

Field Summary

Modifier and TypeField and Description
private final List<? extends LatentMatcher<? super S>>
matchers

The matchers this conjunction represents.

Constructor Summary

AccessConstructor and Description
public
Conjunction(LatentMatcher<? super S>...
The matchers this conjunction represents.
matcher
)

Creates a new conjunction of latent matchers.

public
Conjunction(List<? extends LatentMatcher<? super S>>
The matchers this conjunction represents.
matchers
)

Creates a new conjunction of latent matchers.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super S>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matchersback to summary
private final List<? extends LatentMatcher<? super S>> matchers

The matchers this conjunction represents.

Constructor Detail

Conjunctionback to summary
public Conjunction(LatentMatcher<? super S>... matcher)

Creates a new conjunction of latent matchers.

Parameters
matcher:LatentMatcher<? super S>[]

The matchers this conjunction represents.

Annotations
@SuppressWarnings:unchecked
Conjunctionback to summary
public Conjunction(List<? extends LatentMatcher<? super S>> matchers)

Creates a new conjunction of latent matchers.

Parameters
matchers:List<? extends LatentMatcher<? super S>>

The matchers this conjunction represents.

Method Detail

resolveback to summary
public ElementMatcher<? super S> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super S>

An ElementMatcher that represents this matcher's resolved form.

net.bytebuddy.matcher back to summary

public Class LatentMatcher.Disjunction<S>

extends Object
implements LatentMatcher<S>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance
Type Parameters
<S>
The type of the matched element.

A matcher that computes the disjunction of all supplied latent matchers.

Field Summary

Modifier and TypeField and Description
private final List<? extends LatentMatcher<? super S>>
matchers

The matchers this disjunction represents.

Constructor Summary

AccessConstructor and Description
public
Disjunction(LatentMatcher<? super S>...
The matchers this disjunction represents.
matcher
)

Creates a new disjunction of latent matchers.

public
Disjunction(List<? extends LatentMatcher<? super S>>
The matchers this disjunction represents.
matchers
)

Creates a new disjunction of latent matchers.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super S>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matchersback to summary
private final List<? extends LatentMatcher<? super S>> matchers

The matchers this disjunction represents.

Constructor Detail

Disjunctionback to summary
public Disjunction(LatentMatcher<? super S>... matcher)

Creates a new disjunction of latent matchers.

Parameters
matcher:LatentMatcher<? super S>[]

The matchers this disjunction represents.

Annotations
@SuppressWarnings:unchecked
Disjunctionback to summary
public Disjunction(List<? extends LatentMatcher<? super S>> matchers)

Creates a new disjunction of latent matchers.

Parameters
matchers:List<? extends LatentMatcher<? super S>>

The matchers this disjunction represents.

Method Detail

resolveback to summary
public ElementMatcher<? super S> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super S>

An ElementMatcher that represents this matcher's resolved form.

net.bytebuddy.matcher back to summary

public Class LatentMatcher.ForFieldToken

extends Object
implements LatentMatcher<FieldDescription>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance

A latent matcher where the field token is being attached to the supplied type description before matching.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
LatentMatcher.ForFieldToken.ResolvedMatcher

A resolved matcher of a latent field matcher for a field token.

Field Summary

Modifier and TypeField and Description
private final FieldDescription.Token
token

A token representing the field being matched.

Constructor Summary

AccessConstructor and Description
public
ForFieldToken(FieldDescription.Token
A token representing the field being matched.
token
)

Creates a new latent matcher for a field token.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super FieldDescription>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tokenback to summary
private final FieldDescription.Token token

A token representing the field being matched.

Constructor Detail

ForFieldTokenback to summary
public ForFieldToken(FieldDescription.Token token)

Creates a new latent matcher for a field token.

Parameters
token:FieldDescription.Token

A token representing the field being matched.

Method Detail

resolveback to summary
public ElementMatcher<? super FieldDescription> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super FieldDescription>

An ElementMatcher that represents this matcher's resolved form.

net.bytebuddy.matcher back to summary

protected Class LatentMatcher.ForFieldToken.ResolvedMatcher

extends ElementMatcher.Junction.ForNonNullValues<FieldDescription>
Class Inheritance
Annotations
@Enhance

A resolved matcher of a latent field matcher for a field token.

Field Summary

Modifier and TypeField and Description
private final FieldDescription.SignatureToken
signatureToken

The signature token representing the matched field.

Constructor Summary

AccessConstructor and Description
protected
ResolvedMatcher(FieldDescription.SignatureToken
The signature token representing the matched field.
signatureToken
)

Creates a new resolved matcher.

Method Summary

Modifier and TypeMethod and Description
protected boolean
doMatch(FieldDescription
The instance to be matched.
target
)

Implements abstract net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Matches the supplied value if it was found not to be null.
Inherited from net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues:
matches

Field Detail

signatureTokenback to summary
private final FieldDescription.SignatureToken signatureToken

The signature token representing the matched field.

Constructor Detail

ResolvedMatcherback to summary
protected ResolvedMatcher(FieldDescription.SignatureToken signatureToken)

Creates a new resolved matcher.

Parameters
signatureToken:FieldDescription.SignatureToken

The signature token representing the matched field.

Method Detail

doMatchback to summary
protected boolean doMatch(FieldDescription target)

Implements abstract net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Doc from net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Matches the supplied value if it was found not to be null.

Parameters
target:FieldDescription

The instance to be matched.

Returns:boolean

true if the given element is matched by this matcher or false otherwise.

net.bytebuddy.matcher back to summary

public Class LatentMatcher.ForMethodToken

extends Object
implements LatentMatcher<MethodDescription>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance

A latent matcher where the method token is being attached to the supplied type description before matching.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
LatentMatcher.ForMethodToken.ResolvedMatcher

A resolved matcher of a latent method matcher for a method token.

Field Summary

Modifier and TypeField and Description
private final MethodDescription.Token
token

A token representing the method being matched.

Constructor Summary

AccessConstructor and Description
public
ForMethodToken(MethodDescription.Token
A token representing the method being matched.
token
)

Creates a new latent matcher for a method token.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super MethodDescription>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tokenback to summary
private final MethodDescription.Token token

A token representing the method being matched.

Constructor Detail

ForMethodTokenback to summary
public ForMethodToken(MethodDescription.Token token)

Creates a new latent matcher for a method token.

Parameters
token:MethodDescription.Token

A token representing the method being matched.

Method Detail

resolveback to summary
public ElementMatcher<? super MethodDescription> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super MethodDescription>

An ElementMatcher that represents this matcher's resolved form.

net.bytebuddy.matcher back to summary

protected Class LatentMatcher.ForMethodToken.ResolvedMatcher

extends ElementMatcher.Junction.ForNonNullValues<MethodDescription>
Class Inheritance
Annotations
@Enhance

A resolved matcher of a latent method matcher for a method token.

Field Summary

Modifier and TypeField and Description
private final MethodDescription.SignatureToken
signatureToken

The signature token representing the matched field.

Constructor Summary

AccessConstructor and Description
protected
ResolvedMatcher(MethodDescription.SignatureToken
The signature token representing the matched field.
signatureToken
)

Creates a new resolved matcher.

Method Summary

Modifier and TypeMethod and Description
public boolean
doMatch(MethodDescription
The instance to be matched.
target
)

Implements abstract net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Matches the supplied value if it was found not to be null.
Inherited from net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues:
matches

Field Detail

signatureTokenback to summary
private final MethodDescription.SignatureToken signatureToken

The signature token representing the matched field.

Constructor Detail

ResolvedMatcherback to summary
protected ResolvedMatcher(MethodDescription.SignatureToken signatureToken)

Creates a new resolved matcher.

Parameters
signatureToken:MethodDescription.SignatureToken

The signature token representing the matched field.

Method Detail

doMatchback to summary
public boolean doMatch(MethodDescription target)

Implements abstract net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Doc from net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Matches the supplied value if it was found not to be null.

Parameters
target:MethodDescription

The instance to be matched.

Returns:boolean

true if the given element is matched by this matcher or false otherwise.

net.bytebuddy.matcher back to summary

public Class LatentMatcher.ForRecordComponentToken

extends Object
implements LatentMatcher<RecordComponentDescription>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance

A latent matcher for a record component token.

Field Summary

Modifier and TypeField and Description
private final RecordComponentDescription.Token
token

The token being matched.

Constructor Summary

AccessConstructor and Description
public
ForRecordComponentToken(RecordComponentDescription.Token
The token being matched.
token
)

Creates a latent matcher for a record component token.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super RecordComponentDescription>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tokenback to summary
private final RecordComponentDescription.Token token

The token being matched.

Constructor Detail

ForRecordComponentTokenback to summary
public ForRecordComponentToken(RecordComponentDescription.Token token)

Creates a latent matcher for a record component token.

Parameters
token:RecordComponentDescription.Token

The token being matched.

Method Detail

resolveback to summary
public ElementMatcher<? super RecordComponentDescription> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super RecordComponentDescription>

An ElementMatcher that represents this matcher's resolved form.

net.bytebuddy.matcher back to summary

public final Enum LatentMatcher.ForSelfDeclaredMethod

extends Enum<LatentMatcher.ForSelfDeclaredMethod>
implements LatentMatcher<MethodDescription>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher

A latent matching methods that are declared by the resolved type.

Field Summary

Modifier and TypeField and Description
public static final LatentMatcher.ForSelfDeclaredMethod
DECLARED

Matches any method declared by the resolved type.

private final boolean
inverted

true if the matcher is inverted.

public static final LatentMatcher.ForSelfDeclaredMethod
NOT_DECLARED

Matches any method not declared by the resolved type.

Constructor Summary

AccessConstructor and Description
private
ForSelfDeclaredMethod(boolean
true if the matcher is inverted.
inverted
)

Creates a new latent matcher for a self-declared method.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super MethodDescription>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
public static LatentMatcher.ForSelfDeclaredMethod
public static LatentMatcher.ForSelfDeclaredMethod[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DECLAREDback to summary
public static final LatentMatcher.ForSelfDeclaredMethod DECLARED

Matches any method declared by the resolved type.

invertedback to summary
private final boolean inverted

true if the matcher is inverted.

NOT_DECLAREDback to summary
public static final LatentMatcher.ForSelfDeclaredMethod NOT_DECLARED

Matches any method not declared by the resolved type.

Constructor Detail

ForSelfDeclaredMethodback to summary
private ForSelfDeclaredMethod(boolean inverted)

Creates a new latent matcher for a self-declared method.

Parameters
inverted:boolean

true if the matcher is inverted.

Method Detail

resolveback to summary
public ElementMatcher<? super MethodDescription> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super MethodDescription>

An ElementMatcher that represents this matcher's resolved form.

Annotations
@SuppressWarnings:unchecked
valueOfback to summary
public static LatentMatcher.ForSelfDeclaredMethod valueOf(String name)
valuesback to summary
public static LatentMatcher.ForSelfDeclaredMethod[] values()
net.bytebuddy.matcher back to summary

public Class LatentMatcher.Resolved<S>

extends Object
implements LatentMatcher<S>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.matcher.LatentMatcher
Annotations
@Enhance
Type Parameters
<S>
The type of the matched element.

A latent matcher representing an already resolved ElementMatcher.

Field Summary

Modifier and TypeField and Description
private final ElementMatcher<? super S>
matcher

The resolved matcher.

Constructor Summary

AccessConstructor and Description
public
Resolved(ElementMatcher<? super S>
The resolved matcher.
matcher
)

Creates a new resolved latent matcher.

Method Summary

Modifier and TypeMethod and Description
public ElementMatcher<? super S>
resolve(TypeDescription
The type description for which the represented matcher should be resolved.
typeDescription
)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matcherback to summary
private final ElementMatcher<? super S> matcher

The resolved matcher.

Constructor Detail

Resolvedback to summary
public Resolved(ElementMatcher<? super S> matcher)

Creates a new resolved latent matcher.

Parameters
matcher:ElementMatcher<? super S>

The resolved matcher.

Method Detail

resolveback to summary
public ElementMatcher<? super S> resolve(TypeDescription typeDescription)

Implements net.bytebuddy.matcher.LatentMatcher.resolve.

Doc from net.bytebuddy.matcher.LatentMatcher.resolve.

Resolves the element matcher this instance represents for the supplied type description.

Parameters
typeDescription:TypeDescription

The type description for which the represented matcher should be resolved.

Returns:ElementMatcher<? super S>

An ElementMatcher that represents this matcher's resolved form.