public class Conditions extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends com.tngtech.archunit.core.domain.properties.HasName> |
fulfill(com.tngtech.archunit.base.DescribedPredicate<T> predicate)
Generic condition to check fulfillment of a predicate.
|
static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> |
haveLeafArgumentTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
Tests leaf argument types of a method against the given predicate.
|
static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> |
haveLeafExceptionTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
Tests leaf exception types of a method against the given predicate.
|
static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> |
haveLeafReturnTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
Tests leaf return types of a method against the given predicate.
|
static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> |
haveLeafTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
Tests leaf types of a method against the given predicate.
|
public static <T extends com.tngtech.archunit.core.domain.properties.HasName> com.tngtech.archunit.lang.ArchCondition<T> fulfill(com.tngtech.archunit.base.DescribedPredicate<T> predicate)
public static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> haveLeafTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
Given some JavaType
, "leaf" types are recursively determined as described below.
Leaf types are taken from argument, return, and (declared) exception types.
public static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> haveLeafReturnTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
See haveLeafTypes(DescribedPredicate)
for details.
public static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> haveLeafArgumentTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
See haveLeafTypes(DescribedPredicate)
for details.
public static com.tngtech.archunit.lang.ArchCondition<com.tngtech.archunit.core.domain.JavaMethod> haveLeafExceptionTypes(com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> typePredicate)
See haveLeafTypes(DescribedPredicate)
for details.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.