Package javacardx.annotations
Annotation Type StringDef
-
@Retention(SOURCE) public @interface StringDef
Defines a character string constant.This annotation is used within a
StringPool
annotation to define a single character string constant.A character string constant can be defined in one of the two following ways:
- With a name and a value expressed as
a Java string literal (as defined by the Java Language Specification).
For example:
@StringDef(name = "Hello", value = "Hello California!")
- With a name and a reference to another
string constant (typically defined in another library package) using its
fully-qualified name.
For example:
@StringDef(name = "S2", reference = "com.sun.jcclassic.samples.stringlib.LibStrings.Hello")
- Since:
- Java Card Classic 3.0.4
- See Also:
StringPool
- With a name and a value expressed as
a Java string literal (as defined by the Java Language Specification).
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
name
The name of the defined string constant.
-
-
-
-
value
java.lang.String value
The literal value of the defined string constant.This attribute is exclusive of the
reference()
attribute. The annotation processor will fail with an error message if both thevalue()
andreference()
attributes are defined.- Returns:
- -
- Default:
- ""
-
-
-
reference
java.lang.String reference
The fully-qualified name of the referenced string constant.This attribute is exclusive of the
value()
attribute. The annotation processor will fail with an error message if both thevalue()
andreference()
attributes are defined.- Returns:
- -
- Default:
- ""
-
-