public class PatternItem extends Object
| Modifier and Type | Field and Description |
|---|---|
String |
description |
boolean |
enabled |
boolean |
fromSource |
static String |
SAME |
int |
severity |
boolean |
singlePattern |
String |
source |
String |
target |
| Constructor and Description |
|---|
PatternItem(String source,
String target,
boolean enabled,
int severity) |
PatternItem(String source,
String target,
boolean enabled,
int severity,
boolean fromSource,
String message) |
PatternItem(String source,
String target,
boolean enabled,
int severity,
String message) |
| Modifier and Type | Method and Description |
|---|---|
void |
compile() |
Pattern |
getSourcePattern() |
Pattern |
getSourceSmartPattern(Matcher trgMatcher)
Gets the pattern object for the source, automatically compiling a new one
if it is null (which means the pattern contains the keyword "
|
Pattern |
getTargetPattern() |
Pattern |
getTargetSmartPattern(Matcher srcMatcher)
Gets the pattern object for the target, automatically compiling a new one
if it is null (which means the pattern contains the keyword "
|
static List<PatternItem> |
loadFile(String path) |
static List<PatternItem> |
saveFile(String path,
List<PatternItem> list) |
public static final String SAME
public String source
public String target
public boolean enabled
public String description
public int severity
public boolean fromSource
public boolean singlePattern
public PatternItem(String source, String target, boolean enabled, int severity, String message)
public static List<PatternItem> loadFile(String path)
public static List<PatternItem> saveFile(String path, List<PatternItem> list)
public void compile()
public Pattern getSourcePattern()
public Pattern getTargetPattern()
public Pattern getTargetSmartPattern(Matcher srcMatcher)
srcMatcher - the source Matcher object (for accessing the captured groups)public Pattern getSourceSmartPattern(Matcher trgMatcher)
trgMatcher - the source Matcher object (for accessing the captured groups)Copyright © 2021. All rights reserved.