Class NamedInterfaces
java.lang.Object
org.springframework.modulith.core.NamedInterfaces
- All Implemented Interfaces:
Iterable<NamedInterface>
A collection of
NamedInterfaces.- Author:
- Oliver Drotbohm
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription(package private) NamedInterfacesand(Iterable<NamedInterface> others) Creates a newNamedInterfacesinstance with the givenNamedInterfaces added.(package private) static NamedInterfacesdiscoverNamedInterfaces(JavaPackage basePackage) Discovers allNamedInterfacesdeclared for the givenJavaPackage.Returns theNamedInterfacewith the given name if present.getNamedInterfacesContaining(com.tngtech.archunit.core.domain.JavaClass type) Returns all named interfaces that contain the given type.(package private) Stream<NamedInterface>getNamedInterfacesContaining(Class<?> type) Returns the unnamedNamedInterfaceof the module.booleanReturns whether at least one explicitNamedInterfaceis declared.iterator()(package private) static NamedInterfacesof(List<NamedInterface> interfaces) Creates a newNamedInterfacesfor the givenNamedInterfaces.(package private) static NamedInterfacesofAnnotatedPackages(JavaPackage basePackage) Creates a newNamedInterfacesfor the given baseJavaPackage.stream()Create aStreamofNamedInterfaces.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
NONE
-
-
Method Details
-
discoverNamedInterfaces
Discovers allNamedInterfacesdeclared for the givenJavaPackage.- Parameters:
basePackage- must not be null.- Returns:
- will never be null.
-
of
Creates a newNamedInterfacesfor the givenNamedInterfaces.- Parameters:
interfaces- must not be null.- Returns:
- will never be null.
-
ofAnnotatedPackages
Creates a newNamedInterfacesfor the given baseJavaPackage.- Parameters:
basePackage- must not be null.- Returns:
- will never be null.
-
hasExplicitInterfaces
public boolean hasExplicitInterfaces()Returns whether at least one explicitNamedInterfaceis declared.- Returns:
- will never be null.
-
stream
Create aStreamofNamedInterfaces.- Returns:
- will never be null.
-
getByName
Returns theNamedInterfacewith the given name if present.- Parameters:
name- must not be null or empty.- Returns:
- will never be null.
-
getUnnamedInterface
Returns the unnamedNamedInterfaceof the module.- Returns:
- will never be null.
-
getNamedInterfacesContaining
public Stream<NamedInterface> getNamedInterfacesContaining(com.tngtech.archunit.core.domain.JavaClass type) Returns all named interfaces that contain the given type.- Parameters:
type- must not be null.- Returns:
- will never be null.
-
iterator
- Specified by:
iteratorin interfaceIterable<NamedInterface>
-
and
Creates a newNamedInterfacesinstance with the givenNamedInterfaces added.- Parameters:
others- must not be null.- Returns:
- will never be null.
-
getNamedInterfacesContaining
-