Class Classes
java.lang.Object
org.springframework.modulith.core.Classes
- All Implemented Interfaces:
com.tngtech.archunit.base.DescribedIterable<com.tngtech.archunit.core.domain.JavaClass>,com.tngtech.archunit.base.HasDescription,Iterable<com.tngtech.archunit.core.domain.JavaClass>
class Classes
extends Object
implements com.tngtech.archunit.base.DescribedIterable<com.tngtech.archunit.core.domain.JavaClass>
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tngtech.archunit.base.DescribedIterable
com.tngtech.archunit.base.DescribedIterable.From -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription(package private) Classesand(Collection<com.tngtech.archunit.core.domain.JavaClass> others) Returns a Classes with the current elements and the given other ones combined.(package private) Classes(package private) booleancontains(com.tngtech.archunit.core.domain.JavaClass type) (package private) boolean(package private) booleanboolean(package private) Stringformat()(package private) static String(package private) static StringFormats the givenJavaClassinto aString, potentially abbreviating the given base package.(package private) String(package private) com.tngtech.archunit.core.domain.JavaClassgetRequiredClass(Class<?> type) inthashCode()(package private) booleanisEmpty()Iterator<com.tngtech.archunit.core.domain.JavaClass>iterator()(package private) static Classesof(com.tngtech.archunit.core.domain.JavaClasses classes) Creates a newClassesfor the givenJavaClasses.(package private) static ClassesCreates a newClassesfor the givenJavaClasses.Stream<com.tngtech.archunit.core.domain.JavaClass>stream()(package private) Classesthat(com.tngtech.archunit.base.DescribedPredicate<? super com.tngtech.archunit.core.domain.JavaClass> predicate) ReturnsClassesthat match the givenDescribedPredicate.(package private) ClassesthatResideIn(PackageName name, boolean nested) Returns all classes that reside the givenPackageName.(package private) Optional<com.tngtech.archunit.core.domain.JavaClass>toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
NONE
-
-
Method Details
-
of
Creates a newClassesfor the givenJavaClasses.- Parameters:
classes- must not be null.- Returns:
-
of
Creates a newClassesfor the givenJavaClasses.- Parameters:
classes- must not be null.- Returns:
- will never be null.
-
toClasses
- Returns:
- will never be null.
-
that
Classes that(com.tngtech.archunit.base.DescribedPredicate<? super com.tngtech.archunit.core.domain.JavaClass> predicate) ReturnsClassesthat match the givenDescribedPredicate.- Parameters:
predicate- must not be null.- Returns:
-
thatResideIn
Returns all classes that reside the givenPackageName.- Parameters:
name- must not be null.nested- whether to include nested packages- Returns:
- will never be null.
-
and
-
and
Returns a Classes with the current elements and the given other ones combined.- Parameters:
others- must not be null.- Returns:
-
stream
-
isEmpty
boolean isEmpty() -
toOptional
Optional<com.tngtech.archunit.core.domain.JavaClass> toOptional() -
contains
boolean contains(com.tngtech.archunit.core.domain.JavaClass type) -
contains
-
contains
-
getRequiredClass
-
getDescription
- Specified by:
getDescriptionin interfacecom.tngtech.archunit.base.HasDescription
-
iterator
-
toString
-
equals
-
hashCode
public int hashCode() -
format
String format() -
format
-
format
-
format
static String format(com.tngtech.archunit.core.domain.JavaClass type, String basePackage, boolean exposed) Formats the givenJavaClassinto aString, potentially abbreviating the given base package.- Parameters:
type- must not be null.basePackage- must not be null.exposed- whether the given type is considered exposed or not.- Returns:
- will never be null.
-