|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=TYPE) @Retention(value=RUNTIME) public @interface ASN1Anonymous
Indicates that a type does not have own identifier.
If an @ASN1Anonymous
annotation is present on a type, base type's
identifier is used instead of identifier of the type. This annotation is used
for defining types which defined as an element of a constructive type or a
component of a collection type without own type name.
For example, following ASN.1 definition :
Sample ::= SEQUENCE OF SEQUENCE { number INTEGER, bool BOOLEAN }can be translated as :
public class Sample extends SEQUENCE_OF<Sample.Sequence> {
public Sample() {
super(Sample.Sequence.class);
}
@ASN1Anonymous
public static class Sequence extends SEQUENCE {
@ASN1Element(0)
public INTEGER number;
@ASN1Element(1)
public BOOLEAN bool;
}
}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |