public final class RegexNameValidatingRewriter extends Object implements NameRewriter
IDENTITY_REWRITER
Constructor and Description |
---|
RegexNameValidatingRewriter(Pattern pattern,
boolean match)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
Pattern |
getPattern()
Get the pattern.
|
boolean |
isMatch()
Get the match flag.
|
String |
rewriteName(String original)
Rewrite a name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aggregate, aggregate, asPrincipalRewriter, chain, chain, constant
public RegexNameValidatingRewriter(Pattern pattern, boolean match)
pattern
- the pattern that the name must match (or not match) in order to be considered validmatch
- true
if the pattern must match, false
if the pattern must not matchpublic String rewriteName(String original)
NameRewriter
null
.rewriteName
in interface NameRewriter
original
- the original name (must not be null
)null
if the name is invalidpublic Pattern getPattern()
public boolean isMatch()
true
, the pattern must match; if false
, the pattern
must not match.Copyright © 2020 JBoss by Red Hat. All rights reserved.