Interface FieldsThat<CONJUNCTION extends GivenFieldsConjunction>
-
- All Superinterfaces:
MembersThat<CONJUNCTION>
public interface FieldsThat<CONJUNCTION extends GivenFieldsConjunction> extends MembersThat<CONJUNCTION>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CONJUNCTIONareFinal()Matches final fields.CONJUNCTIONareNotFinal()Matches non-final fields.CONJUNCTIONareNotStatic()Matches non-static fields.CONJUNCTIONareStatic()Matches static fields.CONJUNCTIONdoNotHaveRawType(DescribedPredicate<? super JavaClass> predicate)Matches fields where the raw type of those fields does not match the given predicate.CONJUNCTIONdoNotHaveRawType(java.lang.Class<?> type)Matches fields that do not have the given raw type.CONJUNCTIONdoNotHaveRawType(java.lang.String typeName)Matches fields that do not have the given fully qualified name of their raw type.CONJUNCTIONhaveRawType(DescribedPredicate<? super JavaClass> predicate)Matches fields where the raw type of those fields matches the given predicate.CONJUNCTIONhaveRawType(java.lang.Class<?> type)Matches fields by their raw type.CONJUNCTIONhaveRawType(java.lang.String typeName)Matches fields by the fully qualified name of their raw type.-
Methods inherited from interface com.tngtech.archunit.lang.syntax.elements.MembersThat
areAnnotatedWith, areAnnotatedWith, areAnnotatedWith, areDeclaredIn, areDeclaredIn, areDeclaredInClassesThat, areDeclaredInClassesThat, areMetaAnnotatedWith, areMetaAnnotatedWith, areMetaAnnotatedWith, areNotAnnotatedWith, areNotAnnotatedWith, areNotAnnotatedWith, areNotDeclaredIn, areNotDeclaredIn, areNotMetaAnnotatedWith, areNotMetaAnnotatedWith, areNotMetaAnnotatedWith, areNotPackagePrivate, areNotPrivate, areNotProtected, areNotPublic, arePackagePrivate, arePrivate, areProtected, arePublic, doNotHaveFullName, doNotHaveModifier, doNotHaveName, haveFullName, haveFullNameMatching, haveFullNameNotMatching, haveModifier, haveName, haveNameMatching, haveNameNotMatching
-
-
-
-
Method Detail
-
haveRawType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawType(java.lang.Class<?> type)
Matches fields by their raw type. Take for example
Thenclass Example { String someField; }someFieldwould be matched byfields().that().haveRawType(String.class)- Parameters:
type- Type matching fields must have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawType(java.lang.Class<?> type)
Matches fields that do not have the given raw type. Take for example
Thenclass Example { String someField; }someFieldwould be matched byfields().that().doNotHaveRawType(Object.class)- Parameters:
type- Type matching fields must not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawType(java.lang.String typeName)
Matches fields by the fully qualified name of their raw type. Take for example
Thenclass Example { String someField; }someFieldwould be matched byfields().that().haveRawType(String.class.getName())- Parameters:
typeName- Name of type matching fields must have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawType(java.lang.String typeName)
Matches fields that do not have the given fully qualified name of their raw type. Take for example
Thenclass Example { String someField; }someFieldwould be matched byfields().that().doNotHaveRawType(Object.class.getName())- Parameters:
typeName- Name of type matching fields must not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawType(DescribedPredicate<? super JavaClass> predicate)
Matches fields where the raw type of those fields matches the given predicate. Take for example
Thenclass Example { String someField; }someFieldwould be matched byfields().that().haveRawType(assignableTo(Serializable.class))- Parameters:
predicate- A predicate determining which types of fields match- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawType(DescribedPredicate<? super JavaClass> predicate)
Matches fields where the raw type of those fields does not match the given predicate. Take for example
Thenclass Example { String someField; }someFieldwould be matched byfields().that().doNotHaveRawType(assignableTo(List.class))- Parameters:
predicate- A predicate determining which types of fields do not match- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areStatic
@PublicAPI(usage=ACCESS) CONJUNCTION areStatic()
Matches static fields.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotStatic
@PublicAPI(usage=ACCESS) CONJUNCTION areNotStatic()
Matches non-static fields.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areFinal
@PublicAPI(usage=ACCESS) CONJUNCTION areFinal()
Matches final fields.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
areNotFinal
@PublicAPI(usage=ACCESS) CONJUNCTION areNotFinal()
Matches non-final fields.- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
-