jp.bitmeister.asn1.type.builtin
Class ANY

java.lang.Object
  extended by jp.bitmeister.asn1.type.ASN1Type
      extended by jp.bitmeister.asn1.type.PrimitiveType<ASN1Type>
          extended by jp.bitmeister.asn1.type.builtin.ANY
All Implemented Interfaces:
java.lang.Cloneable

public class ANY
extends PrimitiveType<ASN1Type>

Represents ASN.1 'ANY' type.

An instance of this class represents an 'ANY' type data, and has an ASN1Type value to contain any type of ASN.1 data.

Author:
WATANABE, Jun.

Field Summary
 
Fields inherited from class jp.bitmeister.asn1.type.ASN1Type
stringBuilder
 
Constructor Summary
ANY()
          Instantiates an empty ANY.
ANY(ASN1Type value)
          Instantiates an ANY and initialize it with the ASN1Type value.
 
Method Summary
<E extends java.lang.Throwable>
void
accept(ASN1Visitor<E> visitor)
          Accepts the ASN1Visitor and calls a visit method of the visitor.
 boolean hasValue()
          Tests if this ASN.1 data has value.
 boolean matches(ASN1TagClass tagClass, int tagNumber)
          Tests if the ASN.1 tag matches this ASN1 type.
 void validate()
          Tests if this ASN.1 data has valid value.
 
Methods inherited from class jp.bitmeister.asn1.type.PrimitiveType
clear, clone, cloneValue, hashCode, set, value, valueEquals
 
Methods inherited from class jp.bitmeister.asn1.type.ASN1Type
equals, instantiate, specification, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ANY

public ANY()
Instantiates an empty ANY.


ANY

public ANY(ASN1Type value)
Instantiates an ANY and initialize it with the ASN1Type value.

Parameters:
value - The ASN.1 data to be assigned.
Method Detail

hasValue

public boolean hasValue()
Description copied from class: ASN1Type
Tests if this ASN.1 data has value.

Overrides:
hasValue in class PrimitiveType<ASN1Type>
Returns:
true when this ASN.1 data has value.

validate

public void validate()
Description copied from class: ASN1Type
Tests if this ASN.1 data has valid value.

Overrides:
validate in class ASN1Type

matches

public boolean matches(ASN1TagClass tagClass,
                       int tagNumber)
Description copied from class: ASN1Type
Tests if the ASN.1 tag matches this ASN1 type.

Overrides:
matches in class ASN1Type
Parameters:
tagClass - The ASN.1 tag class.
tagNumber - The ASN.1 tag number.
Returns:
true when the tag class and the tag number matches this ASN.1 type.

accept

public <E extends java.lang.Throwable> void accept(ASN1Visitor<E> visitor)
            throws E extends java.lang.Throwable
Description copied from class: ASN1Type
Accepts the ASN1Visitor and calls a visit method of the visitor.

Specified by:
accept in class ASN1Type
Parameters:
visitor - The visitor.
Throws:
E extends java.lang.Throwable