MessageFormat.Field (Java Platform SE 8 ) (original) (raw)
- java.text.AttributedCharacterIterator.Attribute
- java.text.Format.Field
- java.text.MessageFormat.Field
- java.text.Format.Field
All Implemented Interfaces:
Serializable
Enclosing class:
MessageFormat
public static class MessageFormat.Field
extends Format.Field
Defines constants that are used as attribute keys in theAttributedCharacterIterator
returned from MessageFormat.formatToCharacterIterator
.
Since:
1.4
See Also:
Serialized Form
Field Summary
Fields
Modifier and Type Field Description static MessageFormat.Field ARGUMENT Constant identifying a portion of a message that was generated from an argument passed into formatToCharacterIterator. * ### Fields inherited from class java.text.[AttributedCharacterIterator.Attribute](../../java/text/AttributedCharacterIterator.Attribute.html "class in java.text") `[INPUT_METHOD_SEGMENT](../../java/text/AttributedCharacterIterator.Attribute.html#INPUT%5FMETHOD%5FSEGMENT), [LANGUAGE](../../java/text/AttributedCharacterIterator.Attribute.html#LANGUAGE), [READING](../../java/text/AttributedCharacterIterator.Attribute.html#READING)`
Constructor Summary
Constructors
Modifier Constructor Description protected Field(String name) Creates a Field with the specified name. Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method Description protected Object readResolve() Resolves instances being deserialized to the predefined constants. * ### Methods inherited from class java.text.[AttributedCharacterIterator.Attribute](../../java/text/AttributedCharacterIterator.Attribute.html "class in java.text") `[equals](../../java/text/AttributedCharacterIterator.Attribute.html#equals-java.lang.Object-), [getName](../../java/text/AttributedCharacterIterator.Attribute.html#getName--), [hashCode](../../java/text/AttributedCharacterIterator.Attribute.html#hashCode--), [toString](../../java/text/AttributedCharacterIterator.Attribute.html#toString--)` * ### Methods inherited from class java.lang.[Object](../../java/lang/Object.html "class in java.lang") `[clone](../../java/lang/Object.html#clone--), [finalize](../../java/lang/Object.html#finalize--), [getClass](../../java/lang/Object.html#getClass--), [notify](../../java/lang/Object.html#notify--), [notifyAll](../../java/lang/Object.html#notifyAll--), [wait](../../java/lang/Object.html#wait--), [wait](../../java/lang/Object.html#wait-long-), [wait](../../java/lang/Object.html#wait-long-int-)`
Field Detail
* #### ARGUMENT public static final [MessageFormat.Field](../../java/text/MessageFormat.Field.html "class in java.text") ARGUMENT Constant identifying a portion of a message that was generated from an argument passed into `formatToCharacterIterator`. The value associated with the key will be an `Integer` indicating the index in the `arguments` array of the argument from which the text was generated.
Constructor Detail
* #### Field protected Field([String](../../java/lang/String.html "class in java.lang") name) Creates a Field with the specified name. Parameters: `name` \- Name of the attribute
Method Detail
* #### readResolve protected [Object](../../java/lang/Object.html "class in java.lang") readResolve() throws [InvalidObjectException](../../java/io/InvalidObjectException.html "class in java.io") Resolves instances being deserialized to the predefined constants. Overrides: `[readResolve](../../java/text/AttributedCharacterIterator.Attribute.html#readResolve--)` in class `[AttributedCharacterIterator.Attribute](../../java/text/AttributedCharacterIterator.Attribute.html "class in java.text")` Returns: resolved MessageFormat.Field constant Throws: `[InvalidObjectException](../../java/io/InvalidObjectException.html "class in java.io")` \- if the constant could not be resolved.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.