Most visited

Recently visited

Added in API level 1

Annotation

public class Annotation
extends Object

java.lang.Object
   ↳ java.text.Annotation


如果属性具有注释特性,则Annotation对象将用作文本属性值的包装。 这些特点是:

An example is grammatical information attached to a sentence: For the previous sentence, you can say that "an example" is the subject, but you cannot say the same about "an", "example", or "exam". When the text is changed, the grammatical information typically becomes invalid. Another example is Japanese reading information (yomi).

将属性值包装到Annotation对象中可确保即使属性值相等,相邻文本运行也不会合并,并且如果基础文本被修改,则向文本容器指示该属性应该被丢弃。

也可以看看:

Summary

Public constructors

Annotation(Object value)

用给定的值构造一个注释记录,该值可以为null。

Public methods

Object getValue()

返回该属性的值,该值可能为null。

String toString()

返回此注释的字符串表示形式。

Inherited methods

From class java.lang.Object

Public constructors

Annotation

Added in API level 1
Annotation (Object value)

用给定的值构造一个注释记录,该值可以为null。

Parameters
value Object: The value of the attribute

Public methods

getValue

Added in API level 1
Object getValue ()

返回该属性的值,该值可能为null。

Returns
Object

toString

Added in API level 1
String toString ()

返回此注释的字符串表示形式。

Returns
String a string representation of the object.

Hooray!