jp.bitmeister.asn1.annotation
Annotation Type ASN1Identifier


@Target(value={TYPE,FIELD})
@Retention(value=RUNTIME)
public @interface ASN1Identifier

Indicates identifier used for ASN.1 definition.

If an @ASN1Identifier annotation is present on a type or a field, this value is used as ASN.1 identifier instead of their class name that taken by calling Class.getSimpleName() or field name that taken by calling Field.getName(). If an ASN.1 identifier can't be used for Java identifier because of syntax restriction, this annotation shall be used.

For example, following ASN.1 definition :

 Signed-Number ::= SEQUENCE {   -- '-' can't be used for identifier.
        int INTEGER             -- 'int' is a reserved word.
 }
 
can be translated as :
 @ASN1Identifier("Signed-Number")
 public class Signed_Number extends SEQUENCE {
 
        @ASN1Identifier("int")
        @ASN1Element(0)
        public INTEGER _int;
 
 }
 

Author:
WATANABE, Jun.

Required Element Summary
 java.lang.String value
          Indicates the identifier used in ASN.1 definitions.
 

Element Detail

value

public abstract java.lang.String value
Indicates the identifier used in ASN.1 definitions.

Returns:
The ASN.1 identifier.