Class ArchConditions
java.lang.Object
com.tngtech.archunit.lang.conditions.ArchConditions
A collection of predefined
ArchConditions
that can be customized or joined together
via ArchCondition.and(ArchCondition)
and ArchCondition.or(ArchCondition)
.-
Method Summary
Modifier and TypeMethodDescriptionstatic ArchCondition<JavaClass>
accessClassesThat
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
accessClassesThatResideIn
(String packageIdentifier) static ArchCondition<JavaClass>
accessClassesThatResideInAnyPackage
(String... packageIdentifiers) static ArchCondition<JavaClass>
accessField
(Class<?> owner, String fieldName) static ArchCondition<JavaClass>
accessField
(String ownerName, String fieldName) static ArchCondition<JavaClass>
accessFieldWhere
(DescribedPredicate<? super JavaFieldAccess> predicate) static ArchCondition<JavaClass>
accessTargetWhere
(DescribedPredicate<? super JavaAccess<?>> predicate) static <T> ArchCondition<T>
and
(ArchCondition<T> first, ArchCondition<T> second) static <T extends HasDescription & HasSourceCodeLocation>
ArchCondition.ConditionByPredicate<T>be
(DescribedPredicate<? super T> predicate) Derives anArchCondition
from aDescribedPredicate
.static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>beAnnotatedWith
(DescribedPredicate<? super JavaAnnotation<?>> predicate) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>beAnnotatedWith
(Class<? extends Annotation> type) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>beAnnotatedWith
(String typeName) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
beAssignableFrom
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
beAssignableFrom
(Class<?> type) static ArchCondition<JavaClass>
beAssignableFrom
(String typeName) static ArchCondition<JavaClass>
beAssignableTo
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
beAssignableTo
(Class<?> type) static ArchCondition<JavaClass>
beAssignableTo
(String typeName) static ArchCondition<JavaMember>
beDeclaredIn
(Class<?> owner) static ArchCondition<JavaMember>
beDeclaredIn
(String ownerTypeName) static ArchCondition<JavaMember>
beDeclaredInClassesThat
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
beEnums()
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>beFinal()
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>beMetaAnnotatedWith
(DescribedPredicate<? super JavaAnnotation<?>> predicate) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>beMetaAnnotatedWith
(Class<? extends Annotation> type) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>beMetaAnnotatedWith
(String typeName) static ArchCondition<JavaClass>
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>bePublic()
static ArchCondition<JavaClass>
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>beStatic()
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
callCodeUnitWhere
(DescribedPredicate<? super JavaCall<?>> predicate) static ArchCondition<JavaClass>
callConstructor
(Class<?> owner, Class<?>... parameterTypes) static ArchCondition<JavaClass>
callConstructor
(String ownerName, String... parameterTypeNames) static ArchCondition<JavaClass>
callConstructorWhere
(DescribedPredicate<? super JavaConstructorCall> predicate) static ArchCondition<JavaClass>
callMethod
(Class<?> owner, String methodName, Class<?>... parameterTypes) static ArchCondition<JavaClass>
callMethod
(String ownerName, String methodName, String... parameterTypeNames) static ArchCondition<JavaClass>
callMethodWhere
(DescribedPredicate<? super JavaMethodCall> predicate) static <T extends HasName.AndFullName>
ArchCondition<T>containNumberOfElements
(DescribedPredicate<? super Integer> predicate) static ArchCondition<JavaCodeUnit>
declareThrowableOfType
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaCodeUnit>
declareThrowableOfType
(Class<? extends Throwable> type) static ArchCondition<JavaCodeUnit>
declareThrowableOfType
(String typeName) static ArchCondition<JavaClass>
dependOnClassesThat
(DescribedPredicate<? super JavaClass> predicate) static DescribedPredicate<HasName>
fullyQualifiedName
(String name) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
getFieldWhere
(DescribedPredicate<? super JavaFieldAccess> predicate) static <T extends HasDescription & HasSourceCodeLocation>
ArchCondition.ConditionByPredicate<T>have
(DescribedPredicate<? super T> predicate) Derives anArchCondition
from aDescribedPredicate
.static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_FULL_NAME>haveFullName
(String fullName) static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_FULL_NAME>haveFullNameMatching
(String regex) static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_FULL_NAME>haveFullNameNotMatching
(String regex) static ArchCondition<JavaClass>
haveFullyQualifiedName
(String name) static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>haveModifier
(JavaModifier modifier) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameContaining
(String infix) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameEndingWith
(String suffix) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameMatching
(String regex) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameNotContaining
(String infix) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameNotEndingWith
(String suffix) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameNotMatching
(String regex) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameNotStartingWith
(String prefix) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>haveNameStartingWith
(String prefix) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaCodeUnit>
haveRawParameterTypes
(DescribedPredicate<? super List<JavaClass>> predicate) static ArchCondition<JavaCodeUnit>
haveRawParameterTypes
(Class<?>... parameterTypes) static ArchCondition<JavaCodeUnit>
haveRawParameterTypes
(String... parameterTypeNames) static ArchCondition<JavaCodeUnit>
haveRawReturnType
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaCodeUnit>
haveRawReturnType
(Class<?> type) static ArchCondition<JavaCodeUnit>
haveRawReturnType
(String typeName) static ArchCondition<JavaField>
haveRawType
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaField>
haveRawType
(Class<?> type) static ArchCondition<JavaField>
haveRawType
(String typeName) static ArchCondition<JavaClass>
haveSimpleName
(String name) static ArchCondition<JavaClass>
haveSimpleNameContaining
(String infix) static ArchCondition<JavaClass>
haveSimpleNameEndingWith
(String suffix) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
haveSimpleNameNotEndingWith
(String suffix) static ArchCondition<JavaClass>
haveSimpleNameNotStartingWith
(String prefix) static ArchCondition<JavaClass>
haveSimpleNameStartingWith
(String prefix) static ArchCondition<JavaClass>
implement
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static <T> ArchCondition<T>
never
(ArchCondition<T> condition) static <T> ArchCondition<T>
not
(ArchCondition<T> condition) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>notBeAnnotatedWith
(DescribedPredicate<? super JavaAnnotation<?>> predicate) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>notBeAnnotatedWith
(Class<? extends Annotation> type) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>notBeAnnotatedWith
(String typeName) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
notBeAssignableFrom
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
notBeAssignableFrom
(Class<?> type) static ArchCondition<JavaClass>
notBeAssignableFrom
(String typeName) static ArchCondition<JavaClass>
notBeAssignableTo
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
notBeAssignableTo
(Class<?> type) static ArchCondition<JavaClass>
notBeAssignableTo
(String typeName) static ArchCondition<JavaMember>
notBeDeclaredIn
(Class<?> owner) static ArchCondition<JavaMember>
notBeDeclaredIn
(String ownerTypeName) static ArchCondition<JavaClass>
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>notBeMetaAnnotatedWith
(DescribedPredicate<? super JavaAnnotation<?>> predicate) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>notBeMetaAnnotatedWith
(Class<? extends Annotation> type) static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_ANNOTATIONS>notBeMetaAnnotatedWith
(String typeName) static ArchCondition<JavaClass>
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static ArchCondition<JavaClass>
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>static ArchCondition<JavaClass>
static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_FULL_NAME>notHaveFullName
(String fullName) static ArchCondition<JavaClass>
static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_MODIFIERS>notHaveModifier
(JavaModifier modifier) static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation>
ArchCondition<HAS_NAME>notHaveName
(String name) static ArchCondition<JavaClass>
notHaveSimpleName
(String name) static ArchCondition<JavaClass>
notImplement
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
notImplement
(Class<?> interfaceType) static ArchCondition<JavaClass>
notImplement
(String interfaceTypeName) static ArchCondition<JavaClass>
onlyAccessClassesThat
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
onlyAccessFieldsThat
(DescribedPredicate<? super JavaField> predicate) static ArchCondition<JavaClass>
onlyAccessMembersThat
(DescribedPredicate<? super JavaMember> predicate) static ArchCondition<JavaClass>
onlyBeAccessedByAnyPackage
(String... packageIdentifiers) static ArchCondition<JavaClass>
onlyBeAccessedByClassesThat
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaCodeUnit>
onlyBeCalledByClassesThat
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaCodeUnit>
onlyBeCalledByCodeUnitsThat
(DescribedPredicate<? super JavaCodeUnit> predicate) static ArchCondition<JavaCodeUnit>
onlyBeCalledByConstructorsThat
(DescribedPredicate<? super JavaConstructor> predicate) static ArchCondition<JavaCodeUnit>
onlyBeCalledByMethodsThat
(DescribedPredicate<? super JavaMethod> predicate) static ArchCondition<JavaClass>
onlyCallCodeUnitsThat
(DescribedPredicate<? super JavaCodeUnit> predicate) static ArchCondition<JavaClass>
onlyCallConstructorsThat
(DescribedPredicate<? super JavaConstructor> predicate) static ArchCondition<JavaClass>
onlyCallMethodsThat
(DescribedPredicate<? super JavaMethod> predicate) static ArchCondition<JavaClass>
onlyDependOnClassesThat
(DescribedPredicate<? super JavaClass> predicate) static AllDependenciesCondition
onlyHaveDependenciesInAnyPackage
(String... packageIdentifiers) static AllDependenciesCondition
onlyHaveDependenciesWhere
(DescribedPredicate<? super Dependency> predicate) static ArchCondition<JavaClass>
onlyHaveDependentClassesThat
(DescribedPredicate<? super JavaClass> predicate) static ArchCondition<JavaClass>
onlyHaveDependentsInAnyPackage
(String... packageIdentifiers) static ArchCondition<JavaClass>
onlyHaveDependentsWhere
(DescribedPredicate<? super Dependency> predicate) static <T> ArchCondition<T>
or
(ArchCondition<T> first, ArchCondition<T> second) static ArchCondition<JavaClass>
resideInAnyPackage
(String... packageIdentifiers) static ArchCondition<JavaClass>
resideInAPackage
(String packageIdentifier) static ArchCondition<JavaClass>
resideOutsideOfPackage
(String packageIdentifier) static ArchCondition<JavaClass>
resideOutsideOfPackages
(String... packageIdentifiers) static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
static ArchCondition<JavaClass>
setFieldWhere
(DescribedPredicate<? super JavaFieldAccess> predicate) static ArchCondition<JavaClass>
transitivelyDependOnClassesThat
(DescribedPredicate<? super JavaClass> predicate)
-
Method Details
-
getField
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> getField(Class<?> owner, String fieldName) -
getField
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> getField(String ownerName, String fieldName) -
getFieldWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> getFieldWhere(DescribedPredicate<? super JavaFieldAccess> predicate) -
setField
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> setField(Class<?> owner, String fieldName) -
setField
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> setField(String ownerName, String fieldName) -
setFieldWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> setFieldWhere(DescribedPredicate<? super JavaFieldAccess> predicate) -
accessField
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessField(Class<?> owner, String fieldName) -
accessField
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessField(String ownerName, String fieldName) -
accessFieldWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessFieldWhere(DescribedPredicate<? super JavaFieldAccess> predicate) -
onlyAccessFieldsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyAccessFieldsThat(DescribedPredicate<? super JavaField> predicate) -
callMethod
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callMethod(Class<?> owner, String methodName, Class<?>... parameterTypes) -
callMethod
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callMethod(String ownerName, String methodName, String... parameterTypeNames) -
callMethodWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callMethodWhere(DescribedPredicate<? super JavaMethodCall> predicate) -
onlyCallMethodsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyCallMethodsThat(DescribedPredicate<? super JavaMethod> predicate) -
callConstructor
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callConstructor(Class<?> owner, Class<?>... parameterTypes) -
callConstructor
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callConstructor(String ownerName, String... parameterTypeNames) -
callConstructorWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callConstructorWhere(DescribedPredicate<? super JavaConstructorCall> predicate) -
onlyCallConstructorsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyCallConstructorsThat(DescribedPredicate<? super JavaConstructor> predicate) -
callCodeUnitWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> callCodeUnitWhere(DescribedPredicate<? super JavaCall<?>> predicate) -
onlyCallCodeUnitsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyCallCodeUnitsThat(DescribedPredicate<? super JavaCodeUnit> predicate) -
onlyAccessMembersThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyAccessMembersThat(DescribedPredicate<? super JavaMember> predicate) -
accessTargetWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessTargetWhere(DescribedPredicate<? super JavaAccess<?>> predicate) -
accessClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessClassesThat(DescribedPredicate<? super JavaClass> predicate) -
onlyAccessClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyAccessClassesThat(DescribedPredicate<? super JavaClass> predicate) -
dependOnClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> dependOnClassesThat(DescribedPredicate<? super JavaClass> predicate) -
transitivelyDependOnClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> transitivelyDependOnClassesThat(DescribedPredicate<? super JavaClass> predicate) -
onlyDependOnClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyDependOnClassesThat(DescribedPredicate<? super JavaClass> predicate) -
onlyBeAccessedByClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyBeAccessedByClassesThat(DescribedPredicate<? super JavaClass> predicate) -
accessClassesThatResideIn
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessClassesThatResideIn(String packageIdentifier) - Parameters:
packageIdentifier
- A String identifying a package according toPackageMatcher
- Returns:
- A condition matching accesses to packages matching the identifier
-
accessClassesThatResideInAnyPackage
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> accessClassesThatResideInAnyPackage(String... packageIdentifiers) - Parameters:
packageIdentifiers
- Strings identifying a package according toPackageMatcher
- Returns:
- A condition matching accesses to packages matching any of the identifiers
-
onlyBeAccessedByAnyPackage
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyBeAccessedByAnyPackage(String... packageIdentifiers) - Parameters:
packageIdentifiers
- Strings identifying packages according toPackageMatcher
- Returns:
- A condition matching accesses by packages matching any of the identifiers
-
onlyHaveDependentsInAnyPackage
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyHaveDependentsInAnyPackage(String... packageIdentifiers) - Parameters:
packageIdentifiers
- Strings identifying packages according toPackageMatcher
- Returns:
- A condition matching
classes
that have other classes depending on them (e.g. calling methods of this class) with a package matching any of the identifiers
-
onlyHaveDependentClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyHaveDependentClassesThat(DescribedPredicate<? super JavaClass> predicate) - Parameters:
predicate
- A predicate specifying allowed dependencies on this class- Returns:
- A condition satisfied by
classes
where all classes depending on them (e.g. calling methods of this class) are matched by the predicate
-
onlyHaveDependentsWhere
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> onlyHaveDependentsWhere(DescribedPredicate<? super Dependency> predicate) - Parameters:
predicate
- A predicate specifying allowed dependencies on this class- Returns:
- A condition satisfied by
classes
where alldependencies
on them (e.g. calling methods of this class) are matched by the predicate
-
onlyHaveDependenciesInAnyPackage
@PublicAPI(usage=ACCESS) public static AllDependenciesCondition onlyHaveDependenciesInAnyPackage(String... packageIdentifiers) - Parameters:
packageIdentifiers
- Strings identifying packages according toPackageMatcher
- Returns:
- A condition matching
classes
that only depend on other classes (e.g. this class calling methods of other classes) with a package matching any of the identifiers
-
onlyHaveDependenciesWhere
@PublicAPI(usage=ACCESS) public static AllDependenciesCondition onlyHaveDependenciesWhere(DescribedPredicate<? super Dependency> predicate) - Parameters:
predicate
- A predicate identifying relevant dependencies from this class to other classes- Returns:
- A condition matching
classes
that depend on other classes (e.g. this class calling methods of other classes) where the respective dependency is matched by the predicate
-
and
@PublicAPI(usage=ACCESS) public static <T> ArchCondition<T> and(ArchCondition<T> first, ArchCondition<T> second) -
or
@PublicAPI(usage=ACCESS) public static <T> ArchCondition<T> or(ArchCondition<T> first, ArchCondition<T> second) -
never
-
not
-
be
-
notBe
-
be
-
notBe
-
haveName
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveName(String name) -
notHaveName
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> notHaveName(String name) -
haveFullName
@PublicAPI(usage=ACCESS) public static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_FULL_NAME> haveFullName(String fullName) -
notHaveFullName
@PublicAPI(usage=ACCESS) public static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_FULL_NAME> notHaveFullName(String fullName) -
haveFullyQualifiedName
-
fullyQualifiedName
-
notHaveFullyQualifiedName
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notHaveFullyQualifiedName(String name) -
haveSimpleName
-
notHaveSimpleName
-
haveSimpleNameStartingWith
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> haveSimpleNameStartingWith(String prefix) -
haveSimpleNameNotStartingWith
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> haveSimpleNameNotStartingWith(String prefix) -
haveSimpleNameContaining
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> haveSimpleNameContaining(String infix) -
haveSimpleNameNotContaining
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> haveSimpleNameNotContaining(String infix) -
haveSimpleNameEndingWith
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> haveSimpleNameEndingWith(String suffix) -
haveSimpleNameNotEndingWith
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> haveSimpleNameNotEndingWith(String suffix) -
haveNameMatching
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameMatching(String regex) -
haveNameNotMatching
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameNotMatching(String regex) -
haveFullNameMatching
@PublicAPI(usage=ACCESS) public static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_FULL_NAME> haveFullNameMatching(String regex) -
haveFullNameNotMatching
@PublicAPI(usage=ACCESS) public static <HAS_FULL_NAME extends HasName.AndFullName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_FULL_NAME> haveFullNameNotMatching(String regex) -
haveNameStartingWith
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameStartingWith(String prefix) -
haveNameNotStartingWith
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameNotStartingWith(String prefix) -
haveNameContaining
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameContaining(String infix) -
haveNameNotContaining
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameNotContaining(String infix) -
haveNameEndingWith
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameEndingWith(String suffix) -
haveNameNotEndingWith
@PublicAPI(usage=ACCESS) public static <HAS_NAME extends HasName & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_NAME> haveNameNotEndingWith(String suffix) -
resideInAPackage
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> resideInAPackage(String packageIdentifier) -
resideInAnyPackage
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> resideInAnyPackage(String... packageIdentifiers) -
resideOutsideOfPackage
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> resideOutsideOfPackage(String packageIdentifier) -
resideOutsideOfPackages
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> resideOutsideOfPackages(String... packageIdentifiers) -
haveModifier
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> haveModifier(JavaModifier modifier) -
notHaveModifier
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notHaveModifier(JavaModifier modifier) -
bePublic
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> bePublic() -
notBePublic
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notBePublic() -
beProtected
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> beProtected() -
notBeProtected
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notBeProtected() -
bePackagePrivate
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> bePackagePrivate() -
notBePackagePrivate
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notBePackagePrivate() -
bePrivate
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> bePrivate() -
notBePrivate
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notBePrivate() -
beStatic
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> beStatic() -
notBeStatic
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notBeStatic() -
beFinal
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> beFinal() -
notBeFinal
@PublicAPI(usage=ACCESS) public static <HAS_MODIFIERS extends HasModifiers & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_MODIFIERS> notBeFinal() -
haveOnlyFinalFields
-
haveOnlyPrivateConstructors
-
beAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> beAnnotatedWith(Class<? extends Annotation> type) - Returns:
- a condition matching elements analogously to
CanBeAnnotated.Predicates.annotatedWith(Class)
-
notBeAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> notBeAnnotatedWith(Class<? extends Annotation> type) - Returns:
- negation of
beAnnotatedWith(Class)
-
beAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> beAnnotatedWith(String typeName) - Returns:
- a condition matching elements analogously to
CanBeAnnotated.Predicates.annotatedWith(String)
-
notBeAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> notBeAnnotatedWith(String typeName) - Returns:
- negation of
beAnnotatedWith(String)
-
beAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> beAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) - Returns:
- a condition matching elements analogously to
CanBeAnnotated.Predicates.annotatedWith(DescribedPredicate)
-
notBeAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> notBeAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) - Returns:
- negation of
beAnnotatedWith(DescribedPredicate)
-
beMetaAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> beMetaAnnotatedWith(Class<? extends Annotation> type) - Returns:
- a condition matching elements analogously to
CanBeAnnotated.Predicates.metaAnnotatedWith(Class)
-
notBeMetaAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> notBeMetaAnnotatedWith(Class<? extends Annotation> type) - Returns:
- negation of
beMetaAnnotatedWith(Class)
-
beMetaAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> beMetaAnnotatedWith(String typeName) - Returns:
- a condition matching elements analogously to
CanBeAnnotated.Predicates.metaAnnotatedWith(String)
-
notBeMetaAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> notBeMetaAnnotatedWith(String typeName) - Returns:
- negation of
beMetaAnnotatedWith(String)
-
beMetaAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> beMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) - Returns:
- a condition matching elements analogously to
CanBeAnnotated.Predicates.metaAnnotatedWith(DescribedPredicate)
-
notBeMetaAnnotatedWith
@PublicAPI(usage=ACCESS) public static <HAS_ANNOTATIONS extends HasAnnotations<?> & HasDescription & HasSourceCodeLocation> ArchCondition<HAS_ANNOTATIONS> notBeMetaAnnotatedWith(DescribedPredicate<? super JavaAnnotation<?>> predicate) - Returns:
- negation of
beMetaAnnotatedWith(DescribedPredicate)
-
implement
- Returns:
- a condition matching classes analogously to
JavaClass.Predicates.implement(Class)
-
notImplement
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notImplement(Class<?> interfaceType) - Returns:
- negation of
implement(Class)
-
implement
- Returns:
- A condition matching classes analogously to
JavaClass.Predicates.implement(String)
-
notImplement
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notImplement(String interfaceTypeName) - Returns:
- negation of
implement(String)
-
implement
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> implement(DescribedPredicate<? super JavaClass> predicate) - Returns:
- A condition matching classes analogously to
JavaClass.Predicates.implement(DescribedPredicate)
-
notImplement
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notImplement(DescribedPredicate<? super JavaClass> predicate) - Returns:
- negation of
implement(DescribedPredicate)
-
beAssignableTo
- Returns:
- A condition matching classes analogously to
JavaClass.Predicates.assignableTo(Class)
-
notBeAssignableTo
- Returns:
- negation of
beAssignableTo(Class)
-
beAssignableTo
- Returns:
- A condition matching classes analogously to
JavaClass.Predicates.assignableTo(String)
-
notBeAssignableTo
- Returns:
- negation of
beAssignableTo(String)
-
beAssignableTo
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> beAssignableTo(DescribedPredicate<? super JavaClass> predicate) - Returns:
- A condition matching classes analogously to
JavaClass.Predicates.assignableTo(DescribedPredicate)
-
notBeAssignableTo
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notBeAssignableTo(DescribedPredicate<? super JavaClass> predicate) - Returns:
- negation of
beAssignableTo(DescribedPredicate)
-
beAssignableFrom
- Returns:
- A condition matching classes analogously to
JavaClass.Predicates.assignableFrom(Class)
-
notBeAssignableFrom
- Returns:
- negation of
beAssignableFrom(Class)
-
beAssignableFrom
- Returns:
- A condition matching classes analogously to
JavaClass.Predicates.assignableFrom(String)
-
notBeAssignableFrom
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notBeAssignableFrom(String typeName) - Returns:
- negation of
beAssignableFrom(String)
-
beAssignableFrom
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> beAssignableFrom(DescribedPredicate<? super JavaClass> predicate) - Returns:
- A condition matching classes analogously to
JavaClass.Predicates.assignableFrom(DescribedPredicate)
-
notBeAssignableFrom
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaClass> notBeAssignableFrom(DescribedPredicate<? super JavaClass> predicate) - Returns:
- negation of
beAssignableFrom(DescribedPredicate)
-
beInterfaces
- Returns:
- A condition matching interfaces as defined in
JavaClass.isInterface()
- See Also:
-
notBeInterfaces
- Returns:
- negation of
beInterfaces()
-
beEnums
- Returns:
- A condition matching classes that are enums as defined in
JavaClass.isEnum()
- See Also:
-
notBeEnums
- Returns:
- negation of
beEnums()
-
beRecords
- Returns:
- A condition matching classes that are records according to the Java Language Specification
as defined in
JavaClass.isRecord()
- See Also:
-
notBeRecords
- Returns:
- negation of
beRecords()
-
beTopLevelClasses
- Returns:
- A condition matching classes that are top level classes (not nested classes)
as defined in
JavaClass.isTopLevelClass()
- See Also:
-
notBeTopLevelClasses
- Returns:
- negation of
beTopLevelClasses()
-
beNestedClasses
- Returns:
- A condition matching classes that are nested classes as defined in
JavaClass.isNestedClass()
- See Also:
-
notBeNestedClasses
- Returns:
- negation of
beNestedClasses()
-
beMemberClasses
- Returns:
- A condition matching classes that are member classes as defined in
JavaClass.isMemberClass()
- See Also:
-
notBeMemberClasses
- Returns:
- negation of
beMemberClasses()
-
beInnerClasses
- Returns:
- A condition matching classes that are inner classes as defined in
JavaClass.isInnerClass()
- See Also:
-
notBeInnerClasses
- Returns:
- negation of
beInnerClasses()
-
beAnonymousClasses
- Returns:
- A condition matching classes that are anonymous as defined in
JavaClass.isAnonymousClass()
- See Also:
-
notBeAnonymousClasses
- Returns:
- negation of
beAnonymousClasses()
-
beLocalClasses
- Returns:
- A condition matching classes that are local as defined in
JavaClass.isLocalClass()
- See Also:
-
notBeLocalClasses
- Returns:
- negation of
beLocalClasses()
-
containNumberOfElements
@PublicAPI(usage=ACCESS) public static <T extends HasName.AndFullName> ArchCondition<T> containNumberOfElements(DescribedPredicate<? super Integer> predicate) -
beDeclaredIn
- Returns:
- A condition matching members that are declared in the specified class
- See Also:
-
notBeDeclaredIn
- Returns:
- negation of
beDeclaredIn(Class)
-
beDeclaredIn
- Returns:
- like
beDeclaredIn(Class)
but the class is specified by the fully qualified class name - See Also:
-
notBeDeclaredIn
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaMember> notBeDeclaredIn(String ownerTypeName) - Returns:
- negation of
beDeclaredIn(String)
-
beDeclaredInClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaMember> beDeclaredInClassesThat(DescribedPredicate<? super JavaClass> predicate) - Returns:
- like
beDeclaredIn(Class)
but matching classes are defined by a predicate
-
haveRawType
- Returns:
- A condition matching fields that have a specific raw type
- See Also:
-
haveRawType
- Returns:
- like
haveRawType(Class)
but the class is specified by the fully qualified class name
-
haveRawType
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaField> haveRawType(DescribedPredicate<? super JavaClass> predicate) - Returns:
- like
haveRawType(Class)
but matching classes are defined by a predicate
-
haveRawParameterTypes
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> haveRawParameterTypes(Class<?>... parameterTypes) -
haveRawParameterTypes
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> haveRawParameterTypes(String... parameterTypeNames) -
haveRawParameterTypes
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> haveRawParameterTypes(DescribedPredicate<? super List<JavaClass>> predicate) -
haveRawReturnType
-
haveRawReturnType
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> haveRawReturnType(String typeName) -
haveRawReturnType
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> haveRawReturnType(DescribedPredicate<? super JavaClass> predicate) -
declareThrowableOfType
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> declareThrowableOfType(Class<? extends Throwable> type) -
declareThrowableOfType
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> declareThrowableOfType(String typeName) -
declareThrowableOfType
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> declareThrowableOfType(DescribedPredicate<? super JavaClass> predicate) -
onlyBeCalledByClassesThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> onlyBeCalledByClassesThat(DescribedPredicate<? super JavaClass> predicate) -
onlyBeCalledByCodeUnitsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> onlyBeCalledByCodeUnitsThat(DescribedPredicate<? super JavaCodeUnit> predicate) -
onlyBeCalledByMethodsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> onlyBeCalledByMethodsThat(DescribedPredicate<? super JavaMethod> predicate) -
onlyBeCalledByConstructorsThat
@PublicAPI(usage=ACCESS) public static ArchCondition<JavaCodeUnit> onlyBeCalledByConstructorsThat(DescribedPredicate<? super JavaConstructor> predicate) -
have
@PublicAPI(usage=ACCESS) public static <T extends HasDescription & HasSourceCodeLocation> ArchCondition.ConditionByPredicate<T> have(DescribedPredicate<? super T> predicate) Derives anArchCondition
from aDescribedPredicate
. Similar toArchCondition.from(DescribedPredicate)
, but more conveniently creates a message to be used within a 'have'-sentence.
Take e.g.have(simpleName("Demo"))
, then the condition description would be"have simple name 'Demo'"
, each satisfied event would be described as"Class <some.Example> has simple name 'Demo' in (Example.java:0)"
and each violated one as"Class <some.Example> does not have simple name 'Demo' in (Example.java:0)"
.- Type Parameters:
T
- The type of object the condition will test, e.g. aJavaClass
- Parameters:
predicate
- The predicate determining which objects satisfy/violate the condition- Returns:
- A
ConditionByPredicate
derived from the predicate and with 'have'-descriptions
-
be
@PublicAPI(usage=ACCESS) public static <T extends HasDescription & HasSourceCodeLocation> ArchCondition.ConditionByPredicate<T> be(DescribedPredicate<? super T> predicate) Derives anArchCondition
from aDescribedPredicate
. Similar toArchCondition.from(DescribedPredicate)
, but more conveniently creates a message to be used within a 'be'-sentence.
Take e.g.be(assignableTo(Demo.class))
, then the condition description would be"be assignable to com.example.Demo"
, each satisfied event would be described as"Class <some.Example> is assignable to com.example.Demo in (Example.java:0)"
and each violated one as"Class <some.Example> is not assignable to com.example.Demo in (Example.java:0)"
.- Type Parameters:
T
- The type of object the condition will test, e.g. aJavaClass
- Parameters:
predicate
- The predicate determining which objects satisfy/violate the condition- Returns:
- A
ConditionByPredicate
derived from the predicate and with 'be'-descriptions
-