Class Types
java.lang.Object
org.springframework.modulith.core.Types
Utility to deal with a variety of types.
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static class(package private) static class(package private) static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass>ADescribedPredicatematching only interfaces.static <T> @Nullable Class<T>loadIfPresent(String name) Loads the class with the given name if present on the classpath.(package private) static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass>residesInPackageAnnotatedWith(Class<? extends Annotation> type) Creates a newDescribedPredicateto match classes
-
Constructor Details
-
Types
public Types()
-
-
Method Details
-
loadIfPresent
Loads the class with the given name if present on the classpath.- Type Parameters:
T- the type to be loaded- Parameters:
name- the fully-qualified name of the type to be loaded, must not be null or empty.- Returns:
- can be null.
-
residesInPackageAnnotatedWith
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> residesInPackageAnnotatedWith(Class<? extends Annotation> type) Creates a newDescribedPredicateto match classes- Parameters:
type- must not be null.- Returns:
- will never be null.
- Since:
- 1.2
-
isInterface
static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> isInterface()ADescribedPredicatematching only interfaces.- Returns:
- will never be null.
- Since:
- 2.1, 2.0.3, 1.4.8
-