Class NamedInterfaces
java.lang.Object
org.springframework.modulith.core.NamedInterfaces
- All Implemented Interfaces:
- Iterable<NamedInterface>
A collection of 
NamedInterfaces.- Author:
- Oliver Drotbohm
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescription(package private) NamedInterfacesCreates a newNamedInterfacesinstance with the givenNamedInterface.TypeBasedNamedInterfaces added.(package private) static NamedInterfacesdiscoverNamedInterfaces(JavaPackage basePackage) Discovers allNamedInterfacesdeclared for the givenJavaPackage.Returns theNamedInterfacewith the given name if present.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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
NONE
 
- 
- 
Method Details- 
discoverNamedInterfacesDiscovers allNamedInterfacesdeclared for the givenJavaPackage.- Parameters:
- basePackage- must not be null.
- Returns:
- will never be null.
 
- 
ofCreates a newNamedInterfacesfor the givenNamedInterfaces.- Parameters:
- interfaces- must not be null.
- Returns:
- will never be null.
 
- 
ofAnnotatedPackagesCreates a newNamedInterfacesfor the given baseJavaPackage.- Parameters:
- basePackage- must not be null.
- Returns:
- will never be null.
 
- 
hasExplicitInterfacespublic boolean hasExplicitInterfaces()Returns whether at least one explicitNamedInterfaceis declared.- Returns:
- will never be null.
 
- 
streamCreate aStreamofNamedInterfaces.- Returns:
- will never be null.
 
- 
getByNameReturns theNamedInterfacewith the given name if present.- Parameters:
- name- must not be null or empty.
- Returns:
- will never be null.
 
- 
getUnnamedInterfaceReturns the unnamedNamedInterfaceof the module.- Returns:
- will never be null.
 
- 
iterator- Specified by:
- iteratorin interface- Iterable<NamedInterface>
 
- 
andCreates a newNamedInterfacesinstance with the givenNamedInterface.TypeBasedNamedInterfaces added.- Parameters:
- others- must not be null.
- Returns:
- will never be null.
 
 
-