Package net.bytebuddy.matcher
Class ElementMatcher.Junction.AbstractBase<V>
- java.lang.Object
-
- net.bytebuddy.matcher.ElementMatcher.Junction.AbstractBase<V>
-
- Type Parameters:
V
- The type of the object that is being matched.
- All Implemented Interfaces:
ElementMatcher<V>
,ElementMatcher.Junction<V>
- Direct Known Subclasses:
AccessibilityMatcher
,AnnotationTargetMatcher
,AnnotationTypeMatcher
,ArrayTypeMatcher
,BooleanMatcher
,CachingMatcher
,ClassLoaderHierarchyMatcher
,ClassLoaderParentMatcher
,CollectionElementMatcher
,CollectionErasureMatcher
,CollectionItemMatcher
,CollectionOneToOneMatcher
,CollectionSizeMatcher
,DeclaringAnnotationMatcher
,DeclaringFieldMatcher
,DeclaringMethodMatcher
,DeclaringTypeMatcher
,DefinedShapeMatcher
,DescriptorMatcher
,ElementMatcher.Junction.Conjunction
,ElementMatcher.Junction.Disjunction
,EqualityMatcher
,ErasureMatcher
,FailSafeMatcher
,FieldTypeMatcher
,HasSuperClassMatcher
,HasSuperTypeMatcher
,InheritedAnnotationMatcher
,InstanceTypeMatcher
,IsNamedMatcher
,MethodExceptionTypeMatcher
,MethodOverrideMatcher
,MethodParametersMatcher
,MethodParameterTypeMatcher
,MethodParameterTypesMatcher
,MethodReturnTypeMatcher
,MethodSortMatcher
,ModifierMatcher
,NameMatcher
,NegatingMatcher
,NullMatcher
,PrimitiveTypeMatcher
,RecordMatcher
,SignatureTokenMatcher
,StringMatcher
,StringSetMatcher
,SubTypeMatcher
,SuperTypeMatcher
,TypeSortMatcher
,VisibilityMatcher
- Enclosing interface:
- ElementMatcher.Junction<S>
public abstract static class ElementMatcher.Junction.AbstractBase<V> extends java.lang.Object implements ElementMatcher.Junction<V>
A base implementation ofElementMatcher.Junction
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher.Junction
ElementMatcher.Junction.AbstractBase<V>, ElementMatcher.Junction.Conjunction<W>, ElementMatcher.Junction.Disjunction<W>
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <U extends V>
ElementMatcher.Junction<U>and(ElementMatcher<? super U> other)
Creates a conjunction where this matcher and theother
matcher must both be matched in order to constitute a successful match.<U extends V>
ElementMatcher.Junction<U>or(ElementMatcher<? super U> other)
Creates a disjunction where either this matcher or theother
matcher must be matched in order to constitute a successful match.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.matcher.ElementMatcher
matches
-
-
-
-
Method Detail
-
and
public <U extends V> ElementMatcher.Junction<U> and(ElementMatcher<? super U> other)
Creates a conjunction where this matcher and theother
matcher must both be matched in order to constitute a successful match. The other matcher is only invoked if this matcher constitutes a successful match.- Specified by:
and
in interfaceElementMatcher.Junction<V>
- Type Parameters:
U
- The type of the object that is being matched. Note that Java's type inference might not be able to infer the common subtype of this instance and theother
matcher such that this type must need to be named explicitly.- Parameters:
other
- The second matcher to consult.- Returns:
- A conjunction of this matcher and the other matcher.
-
or
public <U extends V> ElementMatcher.Junction<U> or(ElementMatcher<? super U> other)
Creates a disjunction where either this matcher or theother
matcher must be matched in order to constitute a successful match. The other matcher is only invoked if this matcher constitutes an unsuccessful match.- Specified by:
or
in interfaceElementMatcher.Junction<V>
- Type Parameters:
U
- The type of the object that is being matched. Note that Java's type inference might not be able to infer the common subtype of this instance and theother
matcher such that this type must need to be named explicitly.- Parameters:
other
- The second matcher to consult.- Returns:
- A disjunction of this matcher and the other matcher.
-
-