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 ASN.1 identifier with the module identifier of this type.
 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.
 java.lang.Class<? extends ASN1Module> module()
          Returns the Class object of an ASN.1 module that this type is defined.
 TypeSpecification reference()
          Returns the specification of the referencing type of this type.
 ASN1TagValue tag()
          Returns the ASN.1 tag assigned to this type.
 boolean tagged()
          Tests if this type is tagged or references a tagged type.
 java.lang.String xmlTypeName()
          Returns the XML type name of this type.
 java.lang.String xmlTypeName(java.lang.Class<? extends ASN1Module> module)
          Returns the XML type name of this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

module

public java.lang.Class<? extends ASN1Module> module()
Returns the Class object of an ASN.1 module that this type is defined.

Returns:
The Class object of an ASN.1 module.

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 ASN.1 identifier with the module identifier of this type.

Returns:
The ASN.1 identifier of this type.

xmlTypeName

public java.lang.String xmlTypeName()
Returns the XML type name of this type.

Returns:
The XML type name of this type.

xmlTypeName

public java.lang.String xmlTypeName(java.lang.Class<? extends ASN1Module> module)
Returns the XML type name of this type. If the type

Returns:
The XML type name 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.