public abstract class WhitespaceNormalizer
extends java.lang.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 com.sun.codemodel.JExpression |
generate(com.sun.codemodel.JCodeModel codeModel,
com.sun.codemodel.JExpression literal)
Generates the expression that normalizes
the given expression (which evaluates to java.lang.String).
|
static WhitespaceNormalizer |
parse(java.lang.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 com.sun.codemodel.JExpression generate(com.sun.codemodel.JCodeModel codeModel, com.sun.codemodel.JExpression literal)
codeModel
- The owner code model object under which a new expression
will be created.public static WhitespaceNormalizer parse(java.lang.String method)
method
- Either "preserve", "replace", or "collapse"java.lang.IllegalArgumentException
- when the specified method is invalid.