jp.bitmeister.asn1.annotation
Annotation Type ASN1NamedBit


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface ASN1NamedBit

Indicates that a field represents a named bit of a 'BIT STRING' type.

If a field annotated as @ASN1NamedBit is present in a definition of sub-class of BIT_STRING, the value of the field is the index number of a distinguished bit in a bitstring value. An @ASN1NamedBit field must be a public static final field and the type shall be int. Each value of @ASN1NamedBit fields appearing in definition of a type must be distinct from the others.

For example, following ASN.1 definition :

 Sample ::= BIT STRING { read(0), write(1) }
 
can be translated as :
 public class Sample extends BIT_STRING {
 
        @ASN1NamedBit
        public static final int read = 0;
 
        @ASN1NamedBit
        public static final int write = 1;
 
 }
 

Author:
WATANABE, Jun.
See Also:
BIT_STRING