Class ArchModule.Identifier
java.lang.Object
com.tngtech.archunit.library.modules.ArchModule.Identifier
- Enclosing class:
- ArchModule<DESCRIPTOR extends ArchModule.Descriptor>
@PublicAPI(usage=ACCESS,
state=EXPERIMENTAL)
public static final class ArchModule.Identifier
extends Object
implements Iterable<String>
An
ArchModule.Identifier of an ArchModule. An ArchModule.Identifier is basically an ordered list of string parts that
uniquely identifies an ArchModule, i.e. two modules are equal, if and only if
their identifier is equal (i.e. all the textual parts of the identifier match in order).-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ArchModule.Identifierstatic ArchModule.IdentifierintgetPart(int index) inthashCode()static ArchModule.Identifierignore()Factory method to signal that thisArchModuleis irrelevant.iterator()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
from
@PublicAPI(usage=ACCESS, state=EXPERIMENTAL) public static ArchModule.Identifier from(String... parts) - See Also:
-
from
@PublicAPI(usage=ACCESS, state=EXPERIMENTAL) public static ArchModule.Identifier from(List<String> parts) - Parameters:
parts- The textual parts of theArchModule.Identifier, must not be empty- Returns:
- An
ArchModule.Identifierconsisting of the passedparts
-
ignore
Factory method to signal that thisArchModuleis irrelevant. TheArchModuleidentified by thisArchModule.Identifierwill e.g. be omitted when creatingArchModulesand should i.g. be completely ignored for all purposes.- Returns:
- An
ArchModule.Identifierthat signals that thisArchModuleis irrelevant and should be ignored.
-
getNumberOfParts
- Returns:
- The number of (textual) parts this identifier consists of.
-
getPart
- Parameters:
index- Index of the requested (textual) part- Returns:
- Part with the given index; indices are 1-based (i.e.
getPart(1)) returns the first part.
-
iterator
-
hashCode
public int hashCode() -
equals
-
toString
-