jp.bitmeister.asn1.annotation
Annotation Type ASN1Tag


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

Indicates an ASN.1 tag of a type or a field.

@ASN1Tag annotation is used for providing definitions of ASN.1 tags for ASN.1 types or element fields of structured types.

For example, following ASN.1 definition :

 Sample ::= [APPLICATION 1] SEQUENCE {
        number  [0] IMPLICIT INTEGER,
        bool    [1] BOOLEAN }
 
can be translated as :
 @ASN1Tag(value = 1, tagClass = ASN1TagClass.APPLICATION)
 public class Sample extends SEQUENCE {
 
        @ASN1Element(0)
        @ASN1Tag(value = 0, tagMode = ASN1TagMode.IMPLICIT)
        public INTEGER number;
 
        @ASN1Element(1)
        @ASN1Tag(1)
        public BOOLEAN bool;
 
 }
 

Author:
WATANABE, Jun.
See Also:
ASN1TagClass, ASN1TagMode

Required Element Summary
 int value
          Indicates tag number of this tag.
 
Optional Element Summary
 ASN1TagClass tagClass
          Indicates tag class of this tag.
 ASN1TagMode tagMode
          Indicates the tagging mode of this tag.
 

Element Detail

value

public abstract int value
Indicates tag number of this tag.

Returns:
Tag number.

tagClass

public abstract ASN1TagClass tagClass
Indicates tag class of this tag.

Returns:
Tag class.
Default:
jp.bitmeister.asn1.type.ASN1TagClass.CONTEXT_SPECIFIC

tagMode

public abstract ASN1TagMode tagMode
Indicates the tagging mode of this tag.

Returns:
The tagging mode.
Default:
jp.bitmeister.asn1.type.ASN1TagMode.DEFAULT