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
-
Method Summary
Modifier and TypeMethodDescription(package private) Classes
and
(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) boolean
contains
(com.tngtech.archunit.core.domain.JavaClass type) (package private) boolean
boolean
(package private) String
format()
(package private) static String
(package private) static String
Formats the givenJavaClass
into aString
, potentially abbreviating the given base package.(package private) String
(package private) com.tngtech.archunit.core.domain.JavaClass
getRequiredClass
(Class<?> type) int
hashCode()
(package private) boolean
isEmpty()
Iterator<com.tngtech.archunit.core.domain.JavaClass>
iterator()
(package private) static Classes
of
(com.tngtech.archunit.core.domain.JavaClasses classes) Creates a newClasses
for the givenJavaClass
es.(package private) static Classes
Creates a newClasses
for the givenJavaClass
es.Stream<com.tngtech.archunit.core.domain.JavaClass>
stream()
(package private) Classes
that
(com.tngtech.archunit.base.DescribedPredicate<? super com.tngtech.archunit.core.domain.JavaClass> predicate) ReturnsClasses
that match the givenDescribedPredicate
.(package private) Optional<com.tngtech.archunit.core.domain.JavaClass>
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
NONE
-
-
Method Details
-
of
Creates a newClasses
for the givenJavaClass
es.- Parameters:
classes
- must not be null.- Returns:
-
of
Creates a newClasses
for the givenJavaClass
es.- 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) ReturnsClasses
that match the givenDescribedPredicate
.- Parameters:
predicate
- must not be null.- Returns:
-
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
-
getRequiredClass
-
getDescription
- Specified by:
getDescription
in 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 givenJavaClass
into 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.
-