Top Description Fields Constructors Methods
net.bytebuddy.matcher

public Class CollectionItemMatcher<T>

extends ElementMatcher.Junction.ForNonNullValues<Iterable<? extends T>>
Class Inheritance
Annotations
@Enhance
Type Parameters
<T>
The type of the matched entity.
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin

A list item matcher matches any element of a collection to a given matcher and assures that at least one element matches the supplied iterable condition.

Field Summary

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

The element matcher to apply to each element of a collection.

Constructor Summary

AccessConstructor and Description
public
CollectionItemMatcher(ElementMatcher<? super T>
The element matcher to apply to each element of a iterable collection.
matcher
)

Creates a new matcher that applies another matcher to each element of a matched iterable collection.

Method Summary

Modifier and TypeMethod and Description
protected boolean
doMatch(Iterable<? extends 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 T> matcher

The element matcher to apply to each element of a collection.

Constructor Detail

CollectionItemMatcherback to summary
public CollectionItemMatcher(ElementMatcher<? super T> matcher)

Creates a new matcher that applies another matcher to each element of a matched iterable collection.

Parameters
matcher:ElementMatcher<? super T>

The element matcher to apply to each element of a iterable collection.

Method Detail

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