|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.asn1new.ber.AbstractContainer
This class is the abstract container used to store the current state of a PDU being decoded. It also stores the grammars used to decode the PDU, and zll the informations needed to decode a PDU.
| Field Summary | |
protected int |
currentGrammar
The current grammar |
protected IGrammar[] |
grammars
All the possible grammars |
protected IGrammar[] |
grammarStack
The grammars that are used. |
protected int |
nbGrammars
The number of stored grammars |
protected TLV |
parentTLV
The parent TLV |
protected int |
state
The current state of the decoding |
protected IStates |
states
Store the different states for debug purpose |
protected int[] |
stateStack
Store a stack of the current states used when switching grammars |
protected TLV |
tlv
The current TLV |
protected int |
transition
The current transition |
| Constructor Summary | |
AbstractContainer()
|
|
| Method Summary | |
void |
addGrammar(IGrammar grammar)
Add a IGrammar to use |
void |
clean()
Clean the container for the next usage. |
int |
getCurrentGrammar()
Gert the current grammar number |
int |
getCurrentGrammarType()
Get the current grammar type. |
TLV |
getCurrentTLV()
Get the current TLV |
IGrammar |
getGrammar()
DOCUMENT ME! |
TLV |
getParentTLV()
Get the parent TLV; |
int |
getState()
Get the current grammar state |
IStates |
getStates()
Get the states for this container's grammars |
int |
getTransition()
Get the transition |
int |
restoreGrammar()
restore the previous grammar (the one before a switch has occured) |
void |
setCurrentTLV(TLV tlv)
Set the current TLV |
void |
setInitGrammar(int grammar)
Initialize the grammar stack |
void |
setParentTLV(TLV parentTLV)
Set the parent TLV. |
void |
setState(int state)
Set the new current state |
void |
setTransition(int transition)
Update the transition from a state to another |
void |
switchGrammar(int currentState,
int grammar)
Switch to another grammar |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected IGrammar[] grammarStack
protected IGrammar[] grammars
protected int[] stateStack
protected int nbGrammars
protected int currentGrammar
protected int state
protected int transition
protected TLV tlv
protected IStates states
protected TLV parentTLV
| Constructor Detail |
public AbstractContainer()
| Method Detail |
public IGrammar getGrammar()
getGrammar in interface IAsn1Containerpublic void addGrammar(IGrammar grammar)
addGrammar in interface IAsn1Containergrammar - The grammar to add.
public void switchGrammar(int currentState,
int grammar)
switchGrammar in interface IAsn1ContainercurrentState - DOCUMENT ME!grammar - The grammar to add.public int restoreGrammar()
restoreGrammar in interface IAsn1Containerpublic int getState()
getState in interface IAsn1Containerpublic void setState(int state)
setState in interface IAsn1Containerstate - The new statepublic int getTransition()
getTransition in interface IAsn1Containerpublic void setTransition(int transition)
setTransition in interface IAsn1Containertransition - The transition to setpublic int getCurrentGrammar()
getCurrentGrammar in interface IAsn1Containerpublic int getCurrentGrammarType()
getCurrentGrammarType in interface IAsn1Containerpublic void setInitGrammar(int grammar)
setInitGrammar in interface IAsn1Containergrammar - Set the initial grammarpublic void setCurrentTLV(TLV tlv)
setCurrentTLV in interface IAsn1Containertlv - The current TLVpublic TLV getCurrentTLV()
getCurrentTLV in interface IAsn1Containerpublic IStates getStates()
getStates in interface IAsn1Containerpublic TLV getParentTLV()
getParentTLV in interface IAsn1Containerpublic void setParentTLV(TLV parentTLV)
setParentTLV in interface IAsn1Containerpublic void clean()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||