- java.lang.Object
-
- com.sun.tools.xjc.generator.util.WhitespaceNormalizer
-
public abstract class WhitespaceNormalizer extends Object
Generates code that performs the whitespace normalization.
-
-
Field Summary
Fields Modifier and Type Field Description static WhitespaceNormalizerCOLLAPSEstatic WhitespaceNormalizerPRESERVEstatic WhitespaceNormalizerREPLACE
-
Constructor Summary
Constructors Constructor Description WhitespaceNormalizer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.sun.codemodel.JExpressiongenerate(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 WhitespaceNormalizerparse(String method)Parses "preserve","replace" or "collapse" into the corresponding WhitespaceNormalizer object.
-
-
-
Field Detail
-
PRESERVE
public static final WhitespaceNormalizer PRESERVE
-
REPLACE
public static final WhitespaceNormalizer REPLACE
-
COLLAPSE
public static final WhitespaceNormalizer COLLAPSE
-
-
Method Detail
-
generate
public 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).- Parameters:
codeModel- The owner code model object under which a new expression will be created.
-
parse
public static WhitespaceNormalizer parse(String method)
Parses "preserve","replace" or "collapse" into the corresponding WhitespaceNormalizer object.- Parameters:
method- Either "preserve", "replace", or "collapse"- Throws:
IllegalArgumentException- when the specified method is invalid.
-
-