XCMS Toolkit

schemajic.model
Class ASN1Choice

java.lang.Object
  extended by schemajic.model.ASN1Value
      extended by schemajic.model.ASN1Choice
Direct Known Subclasses:
KeyAgreeRecipientIdentifier, OriginatorIdentifierOrKey, RecipientIdentifier, RecipientInfo, SignerIdentifier

public abstract class ASN1Choice
extends ASN1Value

Models the abstract concept of the value of an ASN.1 CHOICE type.

CHOICE types are defined by referencing a set of distinct types, each a choice alternative. Each value of the choice type is derived from the value of one of these choice alternatives. The choice alternatives, which may be referred to as "components of the choice type" or "selections of the choice type", may be simple builtin types or defined types.

There is n universal class tag assignment for this type.

XML ASN.1 type name is CHOICE.

Version:
1.00 - 2006/02/09
Author:
support@phillipgriffin.com

Constructor Summary
  ASN1Choice()
          Constructor for ASN1Choice.
protected ASN1Choice(ASN1Value value, int index)
          Constructor for ASN1Choice with choice value and choice alternative indicator parameters.
 
Method Summary
 java.lang.Object accept(ValueVisitor visitor, java.lang.Object object)
          Accepts a visit from the ValueVisitor
 Type getAsn1Type()
          Returns an ASN.1 CHOICE type.
 int getChosenIndex()
          Returns the current index indicating a choice alternative.
 ASN1Value getChosenValue()
          Returns the current choice alternative value.
protected  void setChosenIndex(int i)
          Sets the current choice alternative indicator.
 void setChosenValue(ASN1Value value, int index)
          Sets the current choice alternative value and indicator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASN1Choice

public ASN1Choice()
Constructor for ASN1Choice.


ASN1Choice

protected ASN1Choice(ASN1Value value,
                     int index)
Constructor for ASN1Choice with choice value and choice alternative indicator parameters.

Parameters:
value - a choice alternative value of an ASN.1 type
index - a choice altenative indicator of the alternative selected
Method Detail

getChosenIndex

public int getChosenIndex()
Returns the current index indicating a choice alternative.


getChosenValue

public ASN1Value getChosenValue()
Returns the current choice alternative value.


setChosenIndex

protected void setChosenIndex(int i)
Sets the current choice alternative indicator.

Parameters:
i - chosen choice alternative

setChosenValue

public void setChosenValue(ASN1Value value,
                           int index)
Sets the current choice alternative value and indicator.

Parameters:
value - a choice alternative value
index - chosen choice alternative

accept

public java.lang.Object accept(ValueVisitor visitor,
                               java.lang.Object object)
                        throws VisitorException
Accepts a visit from the ValueVisitor

Specified by:
accept in class ASN1Value
Parameters:
visitor - the function applicator (mapper), which knows how to process the given object type and apply appropriate operations to the elements of this type of object
object - an object to be visited
Returns:
a visit to the provided object
Throws:
VisitorException

getAsn1Type

public Type getAsn1Type()
Returns an ASN.1 CHOICE type.

Overrides:
getAsn1Type in class ASN1Value

XCMS Toolkit


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