Enum Class DependencyType
- All Implemented Interfaces:
Serializable
,Comparable<DependencyType>
,Constable
The type of dependency between
ApplicationModule
s.- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that the module refers to an entity of the other.Indicates that the module depends on the other by declaring an event listener for an event exposed by the other module.Indicates that the module depends on the other one by a component dependency, i.e. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<DependencyType>
allBut
(Collection<DependencyType> types) Returns allDependencyType
s except the given ones.static Stream<DependencyType>
allBut
(Stream<DependencyType> types) static Stream<DependencyType>
allBut
(DependencyType... types) Returns allDependencyType
s except the given ones.(package private) DependencyType
defaultOr
(com.tngtech.archunit.thirdparty.com.google.common.base.Supplier<DependencyType> supplier) Returns the currentDependencyType
or obtains the one provided by the given supplier if the current one isDEFAULT
.(package private) static DependencyType
forCodeUnit
(com.tngtech.archunit.core.domain.JavaCodeUnit codeUnit) (package private) static DependencyType
forDependency
(com.tngtech.archunit.core.domain.Dependency dependency) abstract String
format
(FormatableType source, FormatableType target) (package private) static DependencyType
forParameter
(com.tngtech.archunit.core.domain.JavaClass type) static DependencyType
Returns the enum constant of this class with the specified name.static DependencyType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
USES_COMPONENT
Indicates that the module depends on the other one by a component dependency, i.e. that other module needs to be bootstrapped to run the source module. -
ENTITY
Indicates that the module refers to an entity of the other. -
EVENT_LISTENER
Indicates that the module depends on the other by declaring an event listener for an event exposed by the other module. Thus, the target module does not have to be bootstrapped to run the source one. -
DEFAULT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
defaultOr
DependencyType defaultOr(com.tngtech.archunit.thirdparty.com.google.common.base.Supplier<DependencyType> supplier) Returns the currentDependencyType
or obtains the one provided by the given supplier if the current one isDEFAULT
.- Parameters:
supplier
- must not be null.- Returns:
-
forParameter
-
forCodeUnit
-
forDependency
-
format
-
allBut
Returns allDependencyType
s except the given ones.- Parameters:
types
- must not be null.- Returns:
-
allBut
-
allBut
Returns allDependencyType
s except the given ones.- Parameters:
types
- must not be null.- Returns:
-