Package net.bytebuddy.matcher
Interface ElementMatcher<T>
-
- Type Parameters:
T- The type of the object that is being matched.
- All Known Subinterfaces:
ElementMatcher.Junction<S>,Plugin,Plugin.WithPreprocessor
- All Known Implementing Classes:
AccessibilityMatcher,AnnotationTargetMatcher,AnnotationTypeMatcher,ArrayTypeMatcher,AsmVisitorWrapper.ForDeclaredFields.Entry,AsmVisitorWrapper.ForDeclaredMethods.Entry,BooleanMatcher,ByteBuddyMojo.FilePrefixMatcher,CachedReturnPlugin,CachingMatcher,CachingMatcher.WithInlineEviction,ClassLoaderHierarchyMatcher,ClassLoaderParentMatcher,CollectionElementMatcher,CollectionErasureMatcher,CollectionItemMatcher,CollectionOneToOneMatcher,CollectionSizeMatcher,DeclaringAnnotationMatcher,DeclaringFieldMatcher,DeclaringMethodMatcher,DeclaringTypeMatcher,DefinedShapeMatcher,DescriptorMatcher,ElementMatcher.Junction.AbstractBase,ElementMatcher.Junction.Conjunction,ElementMatcher.Junction.Disjunction,EqualityMatcher,ErasureMatcher,FailSafeMatcher,FieldRegistry.Default.Compiled.Entry,FieldTypeMatcher,HashCodeAndEqualsPlugin,HashCodeAndEqualsPlugin.ValueMatcher,HashCodeAndEqualsPlugin.WithNonNullableFields,HasSuperClassMatcher,HasSuperTypeMatcher,InheritedAnnotationMatcher,InstanceTypeMatcher,IsNamedMatcher,LatentMatcher.ForFieldToken.ResolvedMatcher,LatentMatcher.ForMethodToken.ResolvedMatcher,MethodExceptionTypeMatcher,MethodOverrideMatcher,MethodParametersMatcher,MethodParameterTypeMatcher,MethodParameterTypesMatcher,MethodReturnTypeMatcher,MethodSortMatcher,ModifierAdjustment.Adjustment,ModifierMatcher,NameMatcher,NegatingMatcher,NullMatcher,Plugin.ForElementMatcher,Plugin.NoOp,PrimitiveTypeMatcher,RecordComponentRegistry.Default.Compiled.Entry,RecordMatcher,SignatureTokenMatcher,StringMatcher,StringSetMatcher,SubTypeMatcher,SuperTypeMatcher,ToStringPlugin,TypeSortMatcher,VisibilityMatcher
public interface ElementMatcher<T>An element matcher is used as a predicate for identifying code elements such as types, methods, fields or annotations. They are similar to Java 8'sPredicates but compatible to Java 6 and Java 7 and represent a functional interface. They can be chained by using instances ofElementMatcher.Junction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceElementMatcher.Junction<S>A junctions allows to chain differentElementMatchers in a readable manner.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanmatches(T target)Matches a target against this element matcher.
-
-
-
Method Detail
-
matches
boolean matches(T target)
Matches a target against this element matcher.- Parameters:
target- The instance to be matched.- Returns:
trueif the given element is matched by this matcher orfalseotherwise.
-
-