public abstract class WhitespaceNormalizer extends Object
Modifier and Type | Field and Description |
---|---|
static WhitespaceNormalizer |
COLLAPSE |
static WhitespaceNormalizer |
PRESERVE |
static WhitespaceNormalizer |
REPLACE |
Constructor and Description |
---|
WhitespaceNormalizer() |
Modifier and Type | Method and Description |
---|---|
abstract JExpression |
generate(JCodeModel codeModel,
JExpression literal)
Generates the expression that normalizes
the given expression (which evaluates to java.lang.String).
|
static WhitespaceNormalizer |
parse(String method)
Parses "preserve","replace" or "collapse" into
the corresponding WhitespaceNormalizer object.
|
public static final WhitespaceNormalizer PRESERVE
public static final WhitespaceNormalizer REPLACE
public static final WhitespaceNormalizer COLLAPSE
public abstract JExpression generate(JCodeModel codeModel, JExpression literal)
codeModel
- The owner code model object under which a new expression
will be created.public static WhitespaceNormalizer parse(String method)
method
- Either "preserve", "replace", or "collapse"IllegalArgumentException
- when the specified method is invalid.Copyright © 2020 JBoss by Red Hat. All rights reserved.