Class ViolationStore.Delegate
java.lang.Object
com.tngtech.archunit.library.freeze.ViolationStore.Delegate
- All Implemented Interfaces:
ViolationStore
- Enclosing interface:
- ViolationStore
@PublicAPI(usage=INHERITANCE)
public static class ViolationStore.Delegate
extends Object
implements ViolationStore
A simple delegate for a
ViolationStore
to allow adjusting the behavior of another
ViolationStore
by delegation (e.g. TextFileBasedViolationStore
)-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tngtech.archunit.library.freeze.ViolationStore
ViolationStore.Delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getViolations
(ArchRule rule) void
initialize
(Properties properties) Provides custom initialization with properties derived from "archunit.properties" by considering the sub properties offreeze.store
.void
Provides a way to initially store or later update violations of anArchRule
.
-
Constructor Details
-
Delegate
-
-
Method Details
-
initialize
Description copied from interface:ViolationStore
Provides custom initialization with properties derived from "archunit.properties" by considering the sub properties offreeze.store
.
If "archunit.properties" contains, e.g.,
then this method will be called with properties containingfreeze.store.propOne=valueOne freeze.store.propTwo=valueTwo
propOne=valueOne propTwo=valueTwo
- Specified by:
initialize
in interfaceViolationStore
- Parameters:
properties
- The properties derived from the "archunit.properties" prefixfreeze.store
.
-
contains
- Specified by:
contains
in interfaceViolationStore
- Parameters:
rule
- AnArchRule
- Returns:
- true, if and only if this
ViolationStore
contains stored violations for the passedArchRule
-
save
Description copied from interface:ViolationStore
Provides a way to initially store or later update violations of anArchRule
. If there are violations currently stored for the passed rule, those violations will be completely overwritten.- Specified by:
save
in interfaceViolationStore
- Parameters:
rule
- AnArchRule
to store violations forviolations
- A list of lines of violations of anArchRule
-
getViolations
- Specified by:
getViolations
in interfaceViolationStore
- Parameters:
rule
- AnArchRule
- Returns:
- The lines of violations currently stored for the passed
ArchRule
-