Class NamedInterface
java.lang.Object
org.springframework.modulith.core.NamedInterface
- All Implemented Interfaces:
- Iterable<com.tngtech.archunit.core.domain.JavaClass>
public class NamedInterface
extends Object
implements Iterable<com.tngtech.archunit.core.domain.JavaClass>
A named interface into an 
ApplicationModule. This can either be a package, explicitly annotated with
 NamedInterface or a set of types annotated with the same annotation. Other
 ApplicationModules can define allowed dependencies to particular named interfaces via the
 $moduleName::$namedInterfaceName syntax.- Author:
- Oliver Drotbohm
- See Also:
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionStream<com.tngtech.archunit.core.domain.JavaClass>Returns aStreamof allJavaClasses contained in this interface.booleancontains(com.tngtech.archunit.core.domain.JavaClass type) Returns whether theNamedInterfacecontains the givenJavaClass.booleanReturns whether theNamedInterfacecontains the given type.getDefaultedNames(NamedInterface annotation, String packageName) Returns the names declared in the givenNamedInterfaceannotation or defaults to the local name of the given package if none declared.getName()Returns theNamedInterface's name.(package private) booleanhasSameNameAs(NamedInterface other) Returns whether the givenNamedInterfacehas the same name as the current one.booleanReturns whether this is the unnamed (implicit)NamedInterface.Iterator<com.tngtech.archunit.core.domain.JavaClass>iterator()(package private) NamedInterfacemerge(NamedInterface other) Merges the currentNamedInterfacewith the givenNamedInterface.(package private) static NamedInterface(package private) static List<NamedInterface>of(JavaPackage javaPackage) Returns allNamedInterfaces for the givenJavaPackage.toString()(package private) static NamedInterfaceunnamed(JavaPackage javaPackage) Creates an unnamedNamedInterfacefor the givenJavaPackage.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
UNNAMED_NAME- See Also:
 
 
- 
- 
Method Details- 
ofReturns allNamedInterfaces for the givenJavaPackage.- Parameters:
- javaPackage- must not be null.
- Returns:
- will never be null.
 
- 
of- Parameters:
- name- must not be null or empty.
- classes- must not be null.
- Returns:
- will never be null.
 
- 
unnamedCreates an unnamedNamedInterfacefor the givenJavaPackage.- Parameters:
- javaPackage- must not be null.
- Returns:
- will never be null.
 
- 
getNameReturns theNamedInterface's name.- Returns:
- will never be null or empty.
 
- 
isUnnamedpublic boolean isUnnamed()Returns whether this is the unnamed (implicit)NamedInterface.
- 
containspublic boolean contains(com.tngtech.archunit.core.domain.JavaClass type) Returns whether theNamedInterfacecontains the givenJavaClass.- Parameters:
- type- must not be null.
 
- 
containsReturns whether theNamedInterfacecontains the given type.- Parameters:
- type- must not be null.
 
- 
asJavaClassesReturns aStreamof allJavaClasses contained in this interface.- Returns:
- will never be null.
 
- 
hasSameNameAsReturns whether the givenNamedInterfacehas the same name as the current one.- Parameters:
- other- must not be null.
 
- 
iterator
- 
mergeMerges the currentNamedInterfacewith the givenNamedInterface.- Parameters:
- other- must not be null.
- Returns:
- will never be null.
 
- 
toString
- 
getDefaultedNamesReturns the names declared in the givenNamedInterfaceannotation or defaults to the local name of the given package if none declared.- Parameters:
- annotation- must not be null.
- packageName- must not be null.
- Returns:
- will never be null.
 
 
-