jp.bitmeister.asn1.type
Class TypeSpecification

java.lang.Object
  extended by jp.bitmeister.asn1.type.TypeSpecification

public class TypeSpecification
extends java.lang.Object

Specifications of an ASN.1 type.

An instance of this class contains static information of an ASN.1 type.

Author:
WATANABE, Jun.

Method Summary
 java.lang.String fullIdentifier()
          Returns the full identifier of this type that made from ASN.1 module identifier and type identifier.
 boolean hasIdentifier()
          Tests if this type has own identifier.
 java.lang.String identifier()
          Returns the ASN.1 identifier of this type.
 boolean matches(ASN1TagClass tagClass, int tagNumber)
          Tests if the tag class and the tag number matches this type.
 TypeSpecification reference()
          Returns the specification of the referencing type of this type.
 ASN1TagValue tag()
          Returns the ASN.1 tag assigned to this type.
 ASN1TagDefault tagDefault()
          Returns the default tagging mode for the ASN.1 module that this type is defined.
 boolean tagged()
          Tests if this type is tagged or references a tagged type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

tagDefault

public ASN1TagDefault tagDefault()
Returns the default tagging mode for the ASN.1 module that this type is defined.

Returns:
The default tagging mode.

hasIdentifier

public boolean hasIdentifier()
Tests if this type has own identifier.

Returns:
true when this type has own identifier.

identifier

public java.lang.String identifier()
Returns the ASN.1 identifier of this type.

Returns:
The ASN.1 identifier of this type.

fullIdentifier

public java.lang.String fullIdentifier()
Returns the full identifier of this type that made from ASN.1 module identifier and type identifier.

Returns:
The full identifier of this type.

tagged

public boolean tagged()
Tests if this type is tagged or references a tagged type.

Returns:
true when this type or referencing types have ASN.1 tag.

tag

public ASN1TagValue tag()
Returns the ASN.1 tag assigned to this type.

Returns:
The ASN.1 tag.

matches

public boolean matches(ASN1TagClass tagClass,
                       int tagNumber)
Tests if the tag class and the tag number matches this type.

Parameters:
tagClass - The tag class.
tagNumber - The tag number.
Returns:
true when the tag class and the tag number matches this type.

reference

public TypeSpecification reference()
Returns the specification of the referencing type of this type.

Returns:
The specification of the referencing type.