@FunctionalInterface public interface NameRewriter
null
, the name is not valid according to the rules of the rewriter.Modifier and Type | Field and Description |
---|---|
static NameRewriter |
IDENTITY_REWRITER
The simple identity name rewriter, which does no rewriting.
|
Modifier and Type | Method and Description |
---|---|
static NameRewriter |
aggregate(NameRewriter... nameRewriters)
Create a name rewriter which aggregates the given name rewriters; the first rewriter which successfully rewrites
the name is used.
|
static NameRewriter |
aggregate(NameRewriter rewriter1,
NameRewriter rewriter2)
Create a name rewriter which aggregates the given name rewriters; the first rewriter which successfully rewrites
the name is used.
|
default UnaryOperator<Principal> |
asPrincipalRewriter()
Get this name rewriter as a principal rewriter that applies only to
NamePrincipal instances. |
static NameRewriter |
chain(NameRewriter... nameRewriters)
Create a name rewriter which chains the given name rewriters; the name will be rewritten through the given rewriters
in order and then returned.
|
static NameRewriter |
chain(NameRewriter rewriter1,
NameRewriter rewriter2)
Create a name rewriter which chains the given name rewriters; the name will be rewritten through the given rewriters
in order and then returned.
|
static NameRewriter |
constant(String name)
Create a name rewriter which always returns the same name.
|
String |
rewriteName(String original)
Rewrite a name.
|
static final NameRewriter IDENTITY_REWRITER
String rewriteName(String original)
null
.original
- the original name (must not be null
)null
if the name is invaliddefault UnaryOperator<Principal> asPrincipalRewriter()
NamePrincipal
instances.null
)static NameRewriter chain(NameRewriter rewriter1, NameRewriter rewriter2)
null
, then null
is returned.rewriter1
- the first name rewriter (must not be null
)rewriter2
- the second name rewriter (must not be null
)null
)static NameRewriter chain(NameRewriter... nameRewriters)
null
, then null
is returned.nameRewriters
- the name rewriters (must not be null
, cannot have null
elements)null
)static NameRewriter aggregate(NameRewriter rewriter1, NameRewriter rewriter2)
null
, then null
is returned.rewriter1
- the first name rewriter (must not be null
)rewriter2
- the second name rewriter (must not be null
)null
)static NameRewriter aggregate(NameRewriter... nameRewriters)
null
, then null
is returned.nameRewriters
- the name rewriters (must not be null
, cannot have null
elements)null
)static NameRewriter constant(String name)
name
- the name to returnCopyright © 2020 JBoss by Red Hat. All rights reserved.