public class AnnotationRedaction extends Redaction
Represents a redaction that replaces annotation text (comments, etc.) matching a given regular expression.
Constructor and Description |
---|
AnnotationRedaction(Pattern regex,
String replacement)
Initializes a new instance of AnnotationRedaction class.
|
AnnotationRedaction(String pattern,
String replacement)
Initializes a new instance of AnnotationRedaction class.
|
Modifier and Type | Method and Description |
---|---|
RedactorLogEntry |
applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
|
Pattern |
getExpression()
Gets the regular expression to match.
|
String |
getReplacement()
Gets a textual replacement for matched text.
|
public AnnotationRedaction(String pattern, String replacement)
Initializes a new instance of AnnotationRedaction class.
pattern
- Regular expression to matchreplacement
- Textual replacement for matched textpublic final Pattern getExpression()
Gets the regular expression to match.
public final String getReplacement()
Gets a textual replacement for matched text.
public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
Copyright © 2019. All rights reserved.