Interface MembersThat<CONJUNCTION extends GivenMembersConjunction<?>>
-
- All Known Subinterfaces:
CodeUnitsThat<CONJUNCTION>
,FieldsThat<CONJUNCTION>
,MethodsThat<CONJUNCTION>
public interface MembersThat<CONJUNCTION extends GivenMembersConjunction<?>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CONJUNCTION
areAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members annotated with a certain annotation, where matching annotations are determined by the supplied predicate.CONJUNCTION
areAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members annotated with a certain type of annotation.CONJUNCTION
areAnnotatedWith(java.lang.String annotationTypeName)
Matches members annotated with a certain type of annotation.CONJUNCTION
areDeclaredIn(java.lang.Class<?> javaClass)
Matches members declared within the supplied class.CONJUNCTION
areDeclaredIn(java.lang.String className)
Matches members declared within a class of the supplied class name.ClassesThat<CONJUNCTION>
areDeclaredInClassesThat()
Allows to restrict the set of members under consideration by the class they are declared in
E.g.CONJUNCTION
areDeclaredInClassesThat(DescribedPredicate<? super JavaClass> predicate)
Matches members declared within a class matching the supplied predicate.CONJUNCTION
areMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate.CONJUNCTION
areMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members meta-annotated with a certain type of annotation.CONJUNCTION
areMetaAnnotatedWith(java.lang.String annotationTypeName)
Matches members meta-annotated with a certain type of annotation.CONJUNCTION
areNotAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members not annotated with a certain annotation, where matching annotations are determined by the supplied predicate.CONJUNCTION
areNotAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members not annotated with a certain type of annotation.CONJUNCTION
areNotAnnotatedWith(java.lang.String annotationTypeName)
Matches members not annotated with a certain type of annotation.CONJUNCTION
areNotDeclaredIn(java.lang.Class<?> javaClass)
Matches members not declared within the supplied class.CONJUNCTION
areNotDeclaredIn(java.lang.String className)
Matches members not declared within a class of the supplied class name.CONJUNCTION
areNotMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members not meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate.CONJUNCTION
areNotMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members not meta-annotated with a certain type of annotation.CONJUNCTION
areNotMetaAnnotatedWith(java.lang.String annotationTypeName)
Matches members not meta-annotated with a certain type of annotation.CONJUNCTION
areNotPackagePrivate()
Matches non-package private members.CONJUNCTION
areNotPrivate()
Matches non-private members.CONJUNCTION
areNotProtected()
Matches non-protected members.CONJUNCTION
areNotPublic()
Matches non-public members.CONJUNCTION
arePackagePrivate()
Matches package private members.CONJUNCTION
arePrivate()
Matches private members.CONJUNCTION
areProtected()
Matches protected members.CONJUNCTION
arePublic()
Matches public members.CONJUNCTION
doNotHaveFullName(java.lang.String fullName)
Matches members that do not have a certain full name.CONJUNCTION
doNotHaveModifier(JavaModifier modifier)
Matches members not having a certainJavaModifier
(e.g.CONJUNCTION
doNotHaveName(java.lang.String name)
Matches members that do not have a certain name (i.e.CONJUNCTION
haveFullName(java.lang.String fullName)
Matches members by their full name.CONJUNCTION
haveFullNameMatching(java.lang.String regex)
Matches members with a full name matching a given regular expression.CONJUNCTION
haveFullNameNotMatching(java.lang.String regex)
Matches members with a full name not matching a given regular expression.CONJUNCTION
haveModifier(JavaModifier modifier)
Matches members having a certainJavaModifier
(e.g.CONJUNCTION
haveName(java.lang.String name)
Matches members by their name (i.e.CONJUNCTION
haveNameContaining(java.lang.String infix)
Matches members with a name containing the specified infix.CONJUNCTION
haveNameEndingWith(java.lang.String suffix)
Matches members with a name ending with the specified suffix.CONJUNCTION
haveNameMatching(java.lang.String regex)
Matches members with a name (i.e.CONJUNCTION
haveNameNotContaining(java.lang.String infix)
Matches members with a name not containing the specified infix.CONJUNCTION
haveNameNotEndingWith(java.lang.String suffix)
Matches members with a name not ending with the specified suffix.CONJUNCTION
haveNameNotMatching(java.lang.String regex)
Matches members with a name (i.e.CONJUNCTION
haveNameNotStartingWith(java.lang.String prefix)
Matches members with a name not starting with the specified prefix.CONJUNCTION
haveNameStartingWith(java.lang.String prefix)
Matches members with a name starting with the specified prefix.
-
-
-
Method Detail
-
haveName
@PublicAPI(usage=ACCESS) CONJUNCTION haveName(java.lang.String name)
Matches members by their name (i.e. field name, method name orJavaConstructor.CONSTRUCTOR_NAME
).- Parameters:
name
- The member name- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveName
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveName(java.lang.String name)
Matches members that do not have a certain name (i.e. field name, method name orJavaConstructor.CONSTRUCTOR_NAME
).- Parameters:
name
- The member name- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameMatching
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameMatching(java.lang.String regex)
Matches members with a name (i.e. field name, method name orJavaConstructor.CONSTRUCTOR_NAME
) matching a given regular expression.- Parameters:
regex
- A regular expression- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameNotMatching
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameNotMatching(java.lang.String regex)
Matches members with a name (i.e. field name, method name orJavaConstructor.CONSTRUCTOR_NAME
) not matching a given regular expression.- Parameters:
regex
- A regular expression- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveFullName
@PublicAPI(usage=ACCESS) CONJUNCTION haveFullName(java.lang.String fullName)
Matches members by their full name.- Parameters:
fullName
- The member's full name- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveFullName
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveFullName(java.lang.String fullName)
Matches members that do not have a certain full name.- Parameters:
fullName
- The member's full name- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveFullNameMatching
@PublicAPI(usage=ACCESS) CONJUNCTION haveFullNameMatching(java.lang.String regex)
Matches members with a full name matching a given regular expression.- Parameters:
regex
- A regular expression- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveFullNameNotMatching
@PublicAPI(usage=ACCESS) CONJUNCTION haveFullNameNotMatching(java.lang.String regex)
Matches members with a full name not matching a given regular expression.- Parameters:
regex
- A regular expression- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameStartingWith
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameStartingWith(java.lang.String prefix)
Matches members with a name starting with the specified prefix.- Parameters:
prefix
- A prefix the member name should start with- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameNotStartingWith
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameNotStartingWith(java.lang.String prefix)
Matches members with a name not starting with the specified prefix.- Parameters:
prefix
- A prefix the member name should not start with- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameContaining
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameContaining(java.lang.String infix)
Matches members with a name containing the specified infix.- Parameters:
infix
- An infix the member name should contain- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameNotContaining
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameNotContaining(java.lang.String infix)
Matches members with a name not containing the specified infix.- Parameters:
infix
- An infix the member name should not contain- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameEndingWith
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameEndingWith(java.lang.String suffix)
Matches members with a name ending with the specified suffix.- Parameters:
suffix
- A suffix the member name should end with- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveNameNotEndingWith
@PublicAPI(usage=ACCESS) CONJUNCTION haveNameNotEndingWith(java.lang.String suffix)
Matches members with a name not ending with the specified suffix.- Parameters:
suffix
- A suffix the member name should not end with- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
arePublic
@PublicAPI(usage=ACCESS) CONJUNCTION arePublic()
Matches public members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotPublic
@PublicAPI(usage=ACCESS) CONJUNCTION areNotPublic()
Matches non-public members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areProtected
@PublicAPI(usage=ACCESS) CONJUNCTION areProtected()
Matches protected members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotProtected
@PublicAPI(usage=ACCESS) CONJUNCTION areNotProtected()
Matches non-protected members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
arePackagePrivate
@PublicAPI(usage=ACCESS) CONJUNCTION arePackagePrivate()
Matches package private members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotPackagePrivate
@PublicAPI(usage=ACCESS) CONJUNCTION areNotPackagePrivate()
Matches non-package private members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
arePrivate
@PublicAPI(usage=ACCESS) CONJUNCTION arePrivate()
Matches private members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotPrivate
@PublicAPI(usage=ACCESS) CONJUNCTION areNotPrivate()
Matches non-private members.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveModifier
@PublicAPI(usage=ACCESS) CONJUNCTION haveModifier(JavaModifier modifier)
Matches members having a certainJavaModifier
(e.g.JavaModifier.ABSTRACT
).- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveModifier
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveModifier(JavaModifier modifier)
Matches members not having a certainJavaModifier
(e.g.JavaModifier.ABSTRACT
).- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members annotated with a certain type of annotation.- Parameters:
annotationType
- Specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areNotAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members not annotated with a certain type of annotation.- Parameters:
annotationType
- Specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areAnnotatedWith(java.lang.String annotationTypeName)
Matches members annotated with a certain type of annotation.- Parameters:
annotationTypeName
- Fully qualified class name of a specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areNotAnnotatedWith(java.lang.String annotationTypeName)
Matches members not annotated with a certain type of annotation.- Parameters:
annotationTypeName
- Fully qualified class name of a specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members annotated with a certain annotation, where matching annotations are determined by the supplied predicate.- Parameters:
predicate
- A predicate defining matchingJavaAnnotations
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areNotAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members not annotated with a certain annotation, where matching annotations are determined by the supplied predicate.- Parameters:
predicate
- A predicate defining matchingJavaAnnotations
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areMetaAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.- Parameters:
annotationType
- Specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotMetaAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areNotMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Matches members not meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.- Parameters:
annotationType
- Specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areMetaAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areMetaAnnotatedWith(java.lang.String annotationTypeName)
Matches members meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.- Parameters:
annotationTypeName
- Fully qualified class name of a specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotMetaAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areNotMetaAnnotatedWith(java.lang.String annotationTypeName)
Matches members not meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.- Parameters:
annotationTypeName
- Fully qualified class name of a specific type ofAnnotation
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areMetaAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate. A meta-annotation is an annotation that is declared on another annotation.- Parameters:
predicate
- A predicate defining matchingJavaAnnotations
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotMetaAnnotatedWith
@PublicAPI(usage=ACCESS) CONJUNCTION areNotMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate)
Matches members not meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate. A meta-annotation is an annotation that is declared on another annotation.- Parameters:
predicate
- A predicate defining matchingJavaAnnotations
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areDeclaredIn
@PublicAPI(usage=ACCESS) CONJUNCTION areDeclaredIn(java.lang.Class<?> javaClass)
Matches members declared within the supplied class.
E.g.someField
in
will be matched byclass Example { Object someField; }
members()
.that()
.areDeclaredIn(Example.class)
- Parameters:
javaClass
- A class that members have to be declared in to match- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotDeclaredIn
@PublicAPI(usage=ACCESS) CONJUNCTION areNotDeclaredIn(java.lang.Class<?> javaClass)
Matches members not declared within the supplied class.
E.g.someField
in
will not be matched byclass Example { Object someField; }
members()
.that()
.areNotDeclaredIn(Example.class)
- Parameters:
javaClass
- A class that members must not be declared in to match- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areDeclaredIn
@PublicAPI(usage=ACCESS) CONJUNCTION areDeclaredIn(java.lang.String className)
Matches members declared within a class of the supplied class name.
E.g.someField
in
will be matched byclass Example { Object someField; }
members()
.that()
.areDeclaredIn(Example.class.getName())
- Parameters:
className
- Fully qualified name of a class that members have to be declared in to match- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotDeclaredIn
@PublicAPI(usage=ACCESS) CONJUNCTION areNotDeclaredIn(java.lang.String className)
Matches members not declared within a class of the supplied class name.
E.g.someField
in
will not be matched byclass Example { Object someField; }
members()
.that()
.areNotDeclaredIn(Example.class.getName())
- Parameters:
className
- Fully qualified name of a class that members must not be declared in to match- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areDeclaredInClassesThat
@PublicAPI(usage=ACCESS) CONJUNCTION areDeclaredInClassesThat(DescribedPredicate<? super JavaClass> predicate)
Matches members declared within a class matching the supplied predicate.
E.g.someField
in
will be matched byclass Example { Object someField; }
members()
.that()
.areDeclaredInClassesThat(areSubTypeOf(Object.class))
- Parameters:
predicate
- A predicate which matches classes where members have to be declared in- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areDeclaredInClassesThat
@PublicAPI(usage=ACCESS) ClassesThat<CONJUNCTION> areDeclaredInClassesThat()
Allows to restrict the set of members under consideration by the class they are declared in
E.g.someField
in
will be matched byclass Example { Object someField; }
members()
.that()
.areDeclaredInClassesThat()
.areAssignableTo(Object.class)
- Returns:
- A syntax element that allows restricting where members are declared in
-
-