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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetViolations(ArchRule rule) voidinitialize(Properties properties) Provides custom initialization with properties derived from "archunit.properties" by considering the sub properties offreeze.store.voidProvides a way to initially store or later update violations of anArchRule.
-
Constructor Details
-
Delegate
-
-
Method Details
-
initialize
Description copied from interface:ViolationStoreProvides 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=valueTwopropOne=valueOne propTwo=valueTwo- Specified by:
initializein interfaceViolationStore- Parameters:
properties- The properties derived from the "archunit.properties" prefixfreeze.store.
-
contains
- Specified by:
containsin interfaceViolationStore- Parameters:
rule- AnArchRule- Returns:
- true, if and only if this
ViolationStorecontains stored violations for the passedArchRule
-
save
Description copied from interface:ViolationStoreProvides 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:
savein interfaceViolationStore- Parameters:
rule- AnArchRuleto store violations forviolations- A list of lines of violations of anArchRule
-
getViolations
- Specified by:
getViolationsin interfaceViolationStore- Parameters:
rule- AnArchRule- Returns:
- The lines of violations currently stored for the passed
ArchRule
-