|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.bitmeister.asn1.type.ASN1Type
jp.bitmeister.asn1.type.StructuredType
jp.bitmeister.asn1.type.SelectiveType
jp.bitmeister.asn1.type.builtin.CHOICE
public abstract class CHOICE
Represents ASN.1 'CHOICE' type.
This is the base class used for defining 'CHOICE' types. A sub-class of
CHOICE
shall have one or more fields annotated as
@ASN1Alternative
. When a value is assigned to one of the
@ASN1Alternative
fields of an instance, the field becomes selected
field. If an instance has more than two fields which assigned value, the
instance can't be encoded.
ASN1Alternative
Field Summary |
---|
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
stringBuilder |
Constructor Summary | |
---|---|
CHOICE()
Instantiates an empty CHOICE . |
|
CHOICE(ASN1TagClass tagClass,
int tagNumber,
ASN1Type data)
Instantiates a CHOICE and initialize it with parameters. |
|
CHOICE(ASN1Type data)
Instantiates a CHOICE and initialize it with the parameter. |
|
CHOICE(java.lang.String elementName,
ASN1Type data)
Instantiates a CHOICE and initialize it with parameters. |
Method Summary | ||
---|---|---|
|
accept(ASN1Visitor<R,E> visitor)
Accepts the ASN1Visitor and calls a visit method of the
visitor. |
Methods inherited from class jp.bitmeister.asn1.type.SelectiveType |
---|
alternative, clear, clearSelection, clone, get, getElement, hashCode, hasValue, matches, selectedIdentifier, selectedTag, selectedValue, set, set, valueEquals |
Methods inherited from class jp.bitmeister.asn1.type.ASN1Type |
---|
equals, instantiate, specification, toString, validate |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CHOICE()
CHOICE
.
public CHOICE(ASN1Type data)
CHOICE
and initialize it with the parameter. The
ASN.1 tag that assigned to the type of the data is used for select an
alternative.
data
- The data to be assigned.public CHOICE(ASN1TagClass tagClass, int tagNumber, ASN1Type data)
CHOICE
and initialize it with parameters.
tagClass
- The tag class used for select an alternative.tagNumber
- The tag number used for select an alternative.data
- The data to be assigned.public CHOICE(java.lang.String elementName, ASN1Type data)
CHOICE
and initialize it with parameters.
elementName
- The element name used for select an alternative.data
- The data to be assigned.Method Detail |
---|
public <R,E extends java.lang.Throwable> R accept(ASN1Visitor<R,E> visitor) throws E extends java.lang.Throwable
ASN1Type
ASN1Visitor
and calls a visit
method of the
visitor.
accept
in class ASN1Type
visitor
- The visitor.
E
- When an error occured in the visit
method of the
visitor.
E extends java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |