Top Description Fields Constructors Methods
net.bytebuddy.matcher

public Class DeclaringFieldMatcher<T extends net.bytebuddy.description.type.TypeDefinition>

extends ElementMatcher.Junction.ForNonNullValues<T extends TypeDefinition>
Class Inheritance
Annotations
@Enhance
Type Parameters
<T>
The exact type of the annotated element that is matched.
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.description.field.FieldDescription, .FieldList, net.bytebuddy.description.type.TypeDefinition

An element matcher that checks if a type description declares fields of a given property.

Field Summary

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

The field matcher to apply to the declared fields of the matched type description.

Constructor Summary

AccessConstructor and Description
public
DeclaringFieldMatcher(ElementMatcher<? super FieldList<? extends FieldDescription>>
The field matcher to apply to the declared fields of the matched type description.
matcher
)

Creates a new matcher for a type's declared fields.

Method Summary

Modifier and TypeMethod and Description
protected boolean
doMatch(T
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.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from net.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues:
matches

Field Detail

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

The field matcher to apply to the declared fields of the matched type description.

Constructor Detail

DeclaringFieldMatcherback to summary
public DeclaringFieldMatcher(ElementMatcher<? super FieldList<? extends FieldDescription>> matcher)

Creates a new matcher for a type's declared fields.

Parameters
matcher:ElementMatcher<? super FieldList<? extends FieldDescription>>

The field matcher to apply to the declared fields of the matched type description.

Method Detail

doMatchback to summary
protected boolean doMatch(T 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:T

The instance to be matched.

Returns:boolean

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

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override