Top Description Fields Constructors Methods
com.sun.tools.xjc.generator.util

public abstract Class WhitespaceNormalizer

extends Object
Class Inheritance
Imports
com.sun.codemodel.JCodeModel, .JExpr, .JExpression, .JStringLiteral, org.glassfish.jaxb.core.WhiteSpaceProcessor

Generates code that performs the whitespace normalization.

Field Summary

Modifier and TypeField and Description
public static final WhitespaceNormalizer
public static final WhitespaceNormalizer
public static final WhitespaceNormalizer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract JExpression
generate(JCodeModel
The owner code model object under which a new expression will be created.
codeModel
,
JExpression literal)

Generates the expression that normalizes the given expression (which evaluates to java.lang.String).

public static WhitespaceNormalizer
parse(String
Either "preserve", "replace", or "collapse"
method
)

Parses "preserve","replace" or "collapse" into the corresponding WhitespaceNormalizer object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COLLAPSEback to summary
public static final WhitespaceNormalizer COLLAPSE
PRESERVEback to summary
public static final WhitespaceNormalizer PRESERVE
REPLACEback to summary
public static final WhitespaceNormalizer REPLACE

Constructor Detail

WhitespaceNormalizerback to summary
public WhitespaceNormalizer()

Method Detail

generateback to summary
public abstract JExpression generate(JCodeModel codeModel, JExpression literal)

Generates the expression that normalizes the given expression (which evaluates to java.lang.String).

Parameters
codeModel:JCodeModel

The owner code model object under which a new expression will be created.

parseback to summary
public static WhitespaceNormalizer parse(String method)

Parses "preserve","replace" or "collapse" into the corresponding WhitespaceNormalizer object.

Parameters
method:String

Either "preserve", "replace", or "collapse"

Exceptions
IllegalArgumentException:
when the specified method is invalid.