jp.bitmeister.asn1.annotation
Annotation Type ASN1Extendable


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface ASN1Extendable

Indicates that a type is extendable SET, SEQUENCE or CHOICE.

If an @ASN1Extendable annotation is present on a SET, SEQUENCE or CHOICE type class, the class can be base class for other SET, SEQUENCE or CHOICE type class. This annotation will be used for defining common attribute or method to some of SET, SEQUENCE or CHOICE classes by using class inheritance. A type annotated as @ASN1Extendable can't define own elements.

For example :

 @ASN1Extendable
 public class IdentifiableSequence extends SEQUENCE {
 
        private ID id;
 
        public ID getID() {
                return id;
        }
        
        public void SetID(ID id) {
                this.id = id;
        }
 
 }
 
 public class User extends IdentifiableSequence {
 
        @ASN1ElementType(0)
        public INTEGER userNo;
 
        @ASN1ElementType(value = 1, optional = true)
        public PrintableString userName;
 
 }
 
 

Author:
WATANABE, Jun.



Copyright © 2012 BitMeister Inc. All Rights Reserved.