Package net.sourceforge.pmd.reporting
Interface ViolationDecorator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Adds additional key/value pairs to a violation in a language-specific manner.
The keys are completely free.
RuleViolation defines some of these keys.-
Method Summary
Modifier and TypeMethodDescriptionapply(ViolationDecorator decorator, Node violationNode) static ViolationDecoratorchain(List<? extends ViolationDecorator> list) Apply several decorators in a chain.voidCompute additional key/value pairs about the violation that should be reflected inRuleViolation.getAdditionalInfo().static ViolationDecoratornoop()
-
Method Details
-
decorate
Compute additional key/value pairs about the violation that should be reflected inRuleViolation.getAdditionalInfo(). This additional info should be accumulated into theadditionalInfoparameter.- Parameters:
violationNode- The node on which the violation was reportedadditionalInfo- Accumulator
-
apply
-
chain
Apply several decorators in a chain. -
noop
-