public abstract class WhitespaceNormalizer extends Object
Modifier and Type | Field | Description |
---|---|---|
static WhitespaceNormalizer |
COLLAPSE |
|
static WhitespaceNormalizer |
PRESERVE |
|
static WhitespaceNormalizer |
REPLACE |
Constructor | Description |
---|---|
WhitespaceNormalizer() |
Modifier and Type | Method | 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 © 2018 Oracle Corporation. All rights reserved.