This class only has static methods. Each of the nested classes is immutable and thread-safe.
This class and its nested classes are not intended for public subclassing.
| Modifier and Type | Class and Description |
|---|---|
| public static class | MessagePatternUtil.ArgNode
A piece of MessageNode contents representing a message argument and its details. |
| public static class | MessagePatternUtil.ComplexArgStyleNode
A Node representing details of the argument style of a complex argument. |
| public static class | MessagePatternUtil.MessageContentsNode
A piece of MessageNode contents. |
| public static class | MessagePatternUtil.MessageNode
A Node representing a parsed MessageFormat pattern string. |
| public static class | MessagePatternUtil.Node
Common base class for all elements in a tree of nodes
returned by |
| public static class | MessagePatternUtil.TextNode
Literal text, a piece of MessageNode contents. |
| public static class | MessagePatternUtil.VariantNode
A Node representing a nested message (nested inside an argument) with its selection criterion. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static MessagePatternUtil. | |
| private static MessagePatternUtil. | |
| public static MessagePatternUtil. | Returns: a MessageNode or a ComplexArgStyleNodea MessageFormat pattern string patternString)Factory method, builds and returns a MessageNode from a MessageFormat pattern string. |
| public static MessagePatternUtil. | Returns: a MessageNode or a ComplexArgStyleNodea parsed MessageFormat pattern string pattern)Factory method, builds and returns a MessageNode from a MessagePattern. |
| private static MessagePatternUtil. | |
| private static MessagePatternUtil. | |
| private static MessagePatternUtil. |
| MessagePatternUtil | back to summary |
|---|---|
| private MessagePatternUtil() | |
| buildArgNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| buildChoiceStyleNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| buildMessageNode | back to summary |
|---|---|
| public static MessagePatternUtil. Factory method, builds and returns a MessageNode from a MessageFormat pattern string.
| |
| buildMessageNode | back to summary |
|---|---|
| public static MessagePatternUtil. Factory method, builds and returns a MessageNode from a MessagePattern.
| |
| buildMessageNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| buildPluralStyleNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| buildSelectStyleNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| Modifier and Type | Field and Description |
|---|---|
| private MessagePattern. | |
| private MessagePatternUtil. | |
| private String | |
| private int | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static MessagePatternUtil. | |
| public MessagePattern. | |
| public MessagePatternUtil. | Returns: the complex-argument-style object, or null if the argument type is NONE_ARG or SIMPLE_ARG
|
| public String | |
| public int | |
| public String | Returns: the simple-argument style string, or null if no style is specified and for other argument types
|
| public String | |
| public String | toString()
Overrides com. |
| argType | back to summary |
|---|---|
| private MessagePattern. | |
| complexStyle | back to summary |
|---|---|
| private MessagePatternUtil. | |
| name | back to summary |
|---|---|
| private String name | |
| number | back to summary |
|---|---|
| private int number | |
| style | back to summary |
|---|---|
| private String style | |
| typeName | back to summary |
|---|---|
| private String typeName | |
| ArgNode | back to summary |
|---|---|
| private ArgNode() | |
| createArgNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| getArgType | back to summary |
|---|---|
public MessagePattern.
| |
| getComplexStyle | back to summary |
|---|---|
public MessagePatternUtil.
| |
| getName | back to summary |
|---|---|
| public String getName() | |
| getNumber | back to summary |
|---|---|
public int getNumber()
| |
| getSimpleStyle | back to summary |
|---|---|
| public String getSimpleStyle() | |
| getTypeName | back to summary |
|---|---|
| public String getTypeName() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from com. Returns a string representation of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private MessagePattern. | |
| private boolean | |
| private volatile List | |
| private double |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private MessagePatternUtil. | |
| public MessagePattern. | |
| public double | Returns: the plural offset, or 0 if this is not a plural style or the offset is explicitly or implicitly 0
|
| public List | |
| public MessagePatternUtil. | Returns: the "other" variant (the first one if there are several), null if none (choice style)Variants with numeric-value selectors (if any) are added here.
Can be null for a select argument style. numericVariants,Variants with keyword selectors, except "other", are added here.
For a plural argument, if this list is empty after the call, then
all variants except "other" have explicit values
and PluralRules need not be called. keywordVariantsSeparates the variants by type. |
| public boolean | |
| public String |
| argType | back to summary |
|---|---|
| private MessagePattern. | |
| explicitOffset | back to summary |
|---|---|
| private boolean explicitOffset | |
| list | back to summary |
|---|---|
| private volatile List<MessagePatternUtil. | |
| offset | back to summary |
|---|---|
| private double offset | |
| ComplexArgStyleNode | back to summary |
|---|---|
| private ComplexArgStyleNode(MessagePattern. | |
| addVariant | back to summary |
|---|---|
| private void addVariant(MessagePatternUtil. | |
| freeze | back to summary |
|---|---|
| private MessagePatternUtil. | |
| getArgType | back to summary |
|---|---|
public MessagePattern.
| |
| getOffset | back to summary |
|---|---|
public double getOffset()
| |
| getVariants | back to summary |
|---|---|
public List
| |
| getVariantsByType | back to summary |
|---|---|
| public MessagePatternUtil. Separates the variants by type. Intended for use with plural and select argument styles, not useful for choice argument styles. Both parameters are used only for output, and are first cleared.
| |
| hasExplicitOffset | back to summary |
|---|---|
public boolean hasExplicitOffset()
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Class and Description |
|---|---|
| public static enum | MessagePatternUtil.MessageContentsNode.Type
The type of a piece of MessageNode contents. |
| Modifier and Type | Field and Description |
|---|---|
| private MessagePatternUtil. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static MessagePatternUtil. | |
| public MessagePatternUtil. | |
| public String |
| type | back to summary |
|---|---|
| private MessagePatternUtil. | |
| MessageContentsNode | back to summary |
|---|---|
| private MessageContentsNode(MessagePatternUtil. | |
| createReplaceNumberNode | back to summary |
|---|---|
| private static MessagePatternUtil. | |
| getType | back to summary |
|---|---|
| public MessagePatternUtil. Returns the type of this piece of MessageNode contents.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final MessagePatternUtil. | ARG
This is an ArgNode representing a message argument (downcast and use specific methods). |
| public static final MessagePatternUtil. | REPLACE_NUMBER
This Node represents a place in a plural argument's variant where the formatted (plural-offset) value is to be put. |
| public static final MessagePatternUtil. | TEXT
This is a TextNode containing literal text (downcast and call getText()). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static MessagePatternUtil. | |
| public static MessagePatternUtil. |
| ARG | back to summary |
|---|---|
| public static final MessagePatternUtil. This is an ArgNode representing a message argument (downcast and use specific methods).
| |
| REPLACE_NUMBER | back to summary |
|---|---|
| public static final MessagePatternUtil. This Node represents a place in a plural argument's variant where the formatted (plural-offset) value is to be put.
| |
| TEXT | back to summary |
|---|---|
| public static final MessagePatternUtil. This is a TextNode containing literal text (downcast and call getText()).
| |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static MessagePatternUtil. | |
| values | back to summary |
|---|---|
| public static MessagePatternUtil. | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile List |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private MessagePatternUtil. | |
| public List | |
| public String |
| list | back to summary |
|---|---|
| private volatile List<MessagePatternUtil. | |
| MessageNode | back to summary |
|---|---|
| private MessageNode() | |
| addContentsNode | back to summary |
|---|---|
| private void addContentsNode(MessagePatternUtil. | |
| freeze | back to summary |
|---|---|
| private MessagePatternUtil. | |
| getContents | back to summary |
|---|---|
public List
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
MessagePatternUtil#buildMessageNode(MessagePattern).
This class and all subclasses are immutable and thread-safe.
| Access | Constructor and Description |
|---|---|
| private |
| Node | back to summary |
|---|---|
| private Node() | |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | toString()
Overrides com. |
| text | back to summary |
|---|---|
| private String text | |
| TextNode | back to summary |
|---|---|
| private TextNode(String text) | |
| getText | back to summary |
|---|---|
| public String getText() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from com. Returns a string representation of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private MessagePatternUtil. | |
| private double | |
| private String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public MessagePatternUtil. | |
| public String | |
| public double | Returns: the selector's numeric value, or NO_NUMERIC_VALUE if !isSelectorNumeric()
|
| public boolean | |
| public String |
| msgNode | back to summary |
|---|---|
| private MessagePatternUtil. | |
| numericValue | back to summary |
|---|---|
| private double numericValue | |
| selector | back to summary |
|---|---|
| private String selector | |
| VariantNode | back to summary |
|---|---|
| private VariantNode() | |
| getMessage | back to summary |
|---|---|
public MessagePatternUtil.
| |
| getSelector | back to summary |
|---|---|
| public String getSelector() Returns the selector string. For example: A plural/select keyword ("few"), a plural explicit value ("=1"), a choice comparison operator ("#"). | |
| getSelectorValue | back to summary |
|---|---|
public double getSelectorValue()
| |
| isSelectorNumeric | back to summary |
|---|---|
public boolean isSelectorNumeric()
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |