XCMS Toolkit

schemajic.schema
Class Type

java.lang.Object
  extended by schemajic.schema.Type
Direct Known Subclasses:
AliasType, BitStringType, BMPStringType, BooleanType, ChoiceType, EnumeratedType, GeneralizedTimeType, GeneralStringType, IA5StringType, IntegerType, ISO646StringType, NullType, NumericStringType, ObjectIdentifierType, OctetStringType, OpenTypeType, PrintableStringType, RelativeOIDType, RootType, SequenceOfType, SequenceType, SetOfType, T61StringType, TeletexStringType, UniversalStringType, UTF8StringType, VideotexStringType, VisibleStringType

public abstract class Type
extends java.lang.Object

Processing support for ASN.1 types.

Version:
1.00 - 2006/01/21
Author:
support@phillipgriffin.com

Field Summary
protected  TagList _tags
           
 
Constructor Summary
Type(Module module, java.lang.String name, java.lang.String type)
          Constructor for Type with parameters.
Type(Module module, java.lang.String name, java.lang.String type, java.lang.String tags)
          TODO: description goes here
 
Method Summary
abstract  void accept(TypeVisitor t)
          Models the abstract concept of visiting a Java type.
 java.lang.Object createInstance(EncodingRule rule)
          Creates an instance of an ASN.1 encoding rule if the specified encoding rule is supported.
 JavaClassName getJavaName()
          Returns the name of a Java class.
 Module getModule()
          Returns the current ASN.1 module.
 java.lang.String getName()
          Returns the current name.
 java.lang.String getPackageName()
          Returns a Java package name associated with the current ASN.1 module.
 TagList getTags()
          Returns any context specific tags associated with the encoding of a value of some ASN.1 type.
 Type getType()
          Returns the current ASN.1 type.
 java.lang.String getTypeName()
          Returns an ASN.1 type name.
 java.lang.String getXMLName()
          Returns the XML element name used in an XML tag and associated with an ASN.1 type or identifier name.
 boolean isChoice()
          Determines if a type is an ASN.1 CHOICE type.
 boolean isNull()
          Determines if a type is the ASN.1 NULL type.
 boolean isOpenType()
          Determines if a type is an ASN.1 "open type", which is the value of an ASN.1 type in its encoded form.
 boolean isRoot()
          Determines if the current ASN.1 type is in the root module.
 java.lang.String toString()
          Formats a string for an ASN.1 type definition statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_tags

protected TagList _tags
Constructor Detail

Type

public Type(Module module,
            java.lang.String name,
            java.lang.String type)
Constructor for Type with parameters.

Parameters:
module - ASN.1 module name
name - ASN.1 type name
type - ASN.1 type

Type

public Type(Module module,
            java.lang.String name,
            java.lang.String type,
            java.lang.String tags)
TODO: description goes here

Parameters:
module -
name -
type -
tags -
Method Detail

getModule

public Module getModule()
Returns the current ASN.1 module.


isRoot

public boolean isRoot()
Determines if the current ASN.1 type is in the root module.

Returns:
boolean true or false

isChoice

public boolean isChoice()
Determines if a type is an ASN.1 CHOICE type.

Returns:
boolean true or false

isOpenType

public boolean isOpenType()
Determines if a type is an ASN.1 "open type", which is the value of an ASN.1 type in its encoded form.

Returns:
boolean true or false

isNull

public boolean isNull()
Determines if a type is the ASN.1 NULL type.

Returns:
boolean true or false

getName

public java.lang.String getName()
Returns the current name.


getJavaName

public JavaClassName getJavaName()
Returns the name of a Java class.


getXMLName

public java.lang.String getXMLName()
Returns the XML element name used in an XML tag and associated with an ASN.1 type or identifier name.


getType

public Type getType()
Returns the current ASN.1 type.


getTypeName

public java.lang.String getTypeName()
Returns an ASN.1 type name.


getTags

public TagList getTags()
Returns any context specific tags associated with the encoding of a value of some ASN.1 type.


getPackageName

public java.lang.String getPackageName()
Returns a Java package name associated with the current ASN.1 module. \


accept

public abstract void accept(TypeVisitor t)
Models the abstract concept of visiting a Java type.

Parameters:
t - the Java type to be visited

createInstance

public java.lang.Object createInstance(EncodingRule rule)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.InstantiationException,
                                       java.lang.IllegalAccessException
Creates an instance of an ASN.1 encoding rule if the specified encoding rule is supported.

Parameters:
rule - the identifier of an ASN.1 encoding rule, such as "BXER" or "DER"
Returns:
a new instance of an encoding rule object
Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

toString

public java.lang.String toString()
Formats a string for an ASN.1 type definition statement.

Overrides:
toString in class java.lang.Object
Returns:
the formatted ASN.1 type definition statement

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.