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 CONJUNCTIONareAnnotatedWith(DescribedPredicate<? super JavaAnnotation> predicate)Matches members annotated with a certain annotation, where matching annotations are determined by the supplied predicate.CONJUNCTIONareAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)Matches members annotated with a certain type of annotation.CONJUNCTIONareAnnotatedWith(java.lang.String annotationTypeName)Matches members annotated with a certain type of annotation.CONJUNCTIONareDeclaredIn(java.lang.Class<?> javaClass)Matches members declared within the supplied class.CONJUNCTIONareDeclaredIn(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.CONJUNCTIONareDeclaredInClassesThat(DescribedPredicate<? super JavaClass> predicate)Matches members declared within a class matching the supplied predicate.CONJUNCTIONareMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation> predicate)Matches members meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate.CONJUNCTIONareMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)Matches members meta-annotated with a certain type of annotation.CONJUNCTIONareMetaAnnotatedWith(java.lang.String annotationTypeName)Matches members meta-annotated with a certain type of annotation.CONJUNCTIONareNotAnnotatedWith(DescribedPredicate<? super JavaAnnotation> predicate)Matches members not annotated with a certain annotation, where matching annotations are determined by the supplied predicate.CONJUNCTIONareNotAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)Matches members not annotated with a certain type of annotation.CONJUNCTIONareNotAnnotatedWith(java.lang.String annotationTypeName)Matches members not annotated with a certain type of annotation.CONJUNCTIONareNotDeclaredIn(java.lang.Class<?> javaClass)Matches members not declared within the supplied class.CONJUNCTIONareNotDeclaredIn(java.lang.String className)Matches members not declared within a class of the supplied class name.CONJUNCTIONareNotMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation> predicate)Matches members not meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate.CONJUNCTIONareNotMetaAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)Matches members not meta-annotated with a certain type of annotation.CONJUNCTIONareNotMetaAnnotatedWith(java.lang.String annotationTypeName)Matches members not meta-annotated with a certain type of annotation.CONJUNCTIONareNotPackagePrivate()Matches non-package private members.CONJUNCTIONareNotPrivate()Matches non-private members.CONJUNCTIONareNotProtected()Matches non-protected members.CONJUNCTIONareNotPublic()Matches non-public members.CONJUNCTIONarePackagePrivate()Matches package private members.CONJUNCTIONarePrivate()Matches private members.CONJUNCTIONareProtected()Matches protected members.CONJUNCTIONarePublic()Matches public members.CONJUNCTIONdoNotHaveFullName(java.lang.String fullName)Matches members that do not have a certain full name.CONJUNCTIONdoNotHaveModifier(JavaModifier modifier)Matches members not having a certainJavaModifier(e.g.CONJUNCTIONdoNotHaveName(java.lang.String name)Matches members that do not have a certain name (i.e.CONJUNCTIONhaveFullName(java.lang.String fullName)Matches members by their full name.CONJUNCTIONhaveFullNameMatching(java.lang.String regex)Matches members with a full name matching a given regular expression.CONJUNCTIONhaveFullNameNotMatching(java.lang.String regex)Matches members with a full name not matching a given regular expression.CONJUNCTIONhaveModifier(JavaModifier modifier)Matches members having a certainJavaModifier(e.g.CONJUNCTIONhaveName(java.lang.String name)Matches members by their name (i.e.CONJUNCTIONhaveNameMatching(java.lang.String regex)Matches members with a name (i.e.CONJUNCTIONhaveNameNotMatching(java.lang.String regex)Matches members with a name (i.e.
-
-
-
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
-
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.someFieldin
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.someFieldin
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.someFieldin
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.someFieldin
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.someFieldin
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.someFieldin
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
-
-