org.apache.asn1.ber
Class TagEnum

java.lang.Object
  extended by org.apache.asn1.ber.TagEnum
Direct Known Subclasses:
ContextSpecificTag, UniversalTag

public abstract class TagEnum
extends java.lang.Object

Abstract base class for type safe tag enumerations following the agreed upon convention for representing tags as integers. This way the type safe enumeration also represents a preconstructed tag. ASN.1 application module specific enumerations should extend this base for use with the digester.

Version:
$Rev: 289141 $
Author:
Apache Directory Project
See Also:
link to a document explaining how we encoded prefab tags

Field Summary
private  int id
          the id for this tag
private  java.lang.String name
          the name of this enumeration element
private  int value
          the value of this enumeration element
 
Constructor Summary
protected TagEnum(java.lang.String name, int value, int id)
           
 
Method Summary
 int getConstructedTag()
          Gets the constructed version of a tag.
 java.lang.String getName()
          Get's the name of this enumeration element.
 int getPrimitiveTag()
          Gets the primitive version of a tag.
 int getTagId()
          Gets the id of this tag.
 TypeClass getTypeClass()
          Gets the type class of a tag.
 int getValue()
          Get's the value of this enumeration element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private final int id
the id for this tag


name

private final java.lang.String name
the name of this enumeration element


value

private final int value
the value of this enumeration element

Constructor Detail

TagEnum

protected TagEnum(java.lang.String name,
                  int value,
                  int id)
Method Detail

getName

public final java.lang.String getName()
Get's the name of this enumeration element.

Returns:
the name of the enumeration element

getValue

public final int getValue()
Get's the value of this enumeration element.

Returns:
the value of the enumeration element

getTagId

public final int getTagId()
Gets the id of this tag.

Returns:
the id of the tag

getPrimitiveTag

public final int getPrimitiveTag()
Gets the primitive version of a tag.

Returns:
the primitive version of a tag with the P/C bit set to 0

getConstructedTag

public final int getConstructedTag()
Gets the constructed version of a tag.

Returns:
the constructed version of a tag with the P/C bit set to 1

getTypeClass

public final TypeClass getTypeClass()
Gets the type class of a tag.

Returns:
the type class for this tag enumeration.


Copyright © 2004-2009 . All Rights Reserved.