Package com.tngtech.archunit.junit
Enum Class CacheMode
- All Implemented Interfaces:
Serializable,Comparable<CacheMode>,Constable
Determines how the JUnit test support caches classes.
The test support can cache imported classes according to their location between several runs of different test classes, i.e. if
The test support can cache imported classes according to their location between several runs of different test classes, i.e. if
ATest analyses file:///some/path and
BTest analyses the same classes, the classes imported for ATest
will be reused for BTest. If this is not desired, the CacheMode.PER_CLASS
can be used to completely deactivate caching between different test classes.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
PER_CLASS
Signals that imported Java classes should be cached for the current test class only, and discarded afterwards. -
FOREVER
Signals that imported Java classes should be cached by location (i.e. the combination of URLs used to import these classes). The cache usesSoftReferences, i.e. the heap will be freed, once it is needed, but this might cause a noticeable delay, once the garbage collector starts removing all those references at the last possible moment.
-
-
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
-