|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.ber.AbstractContainer
public class 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 IGrammar |
grammar
All the possible grammars |
protected boolean |
grammarEndAllowed
The grammar end transition flag |
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 |
clean()
Clean the container for the next usage. |
TLV |
getCurrentTLV()
Get the current TLV |
IGrammar |
getGrammar()
Get the current grammar |
int |
getNewTlvId()
Return a new ID and increment the counter |
TLV |
getParentTLV()
Get the parent TLV; |
int |
getState()
Get the current grammar state |
IStates |
getStates()
Get the states for this container's grammars |
int |
getTlvId()
Get the current TLV id |
int |
getTransition()
Get the transition |
void |
grammarEndAllowed(boolean grammarEndAllowed)
Set the flag to allow a end transition |
boolean |
isGrammarEndAllowed()
Check that we can have a end state after this transition |
void |
setCurrentTLV(TLV tlv)
Set the current TLV |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IGrammar grammar
protected int[] stateStack
protected int state
protected int transition
protected TLV tlv
protected IStates states
protected TLV parentTLV
protected boolean grammarEndAllowed
| Constructor Detail |
|---|
public AbstractContainer()
| Method Detail |
|---|
public IGrammar getGrammar()
getGrammar in interface IAsn1Containerpublic int getState()
getState in interface IAsn1Containerpublic void setState(int state)
setState in interface IAsn1Containerstate - The new statepublic boolean isGrammarEndAllowed()
isGrammarEndAllowed in interface IAsn1Containerpublic void grammarEndAllowed(boolean grammarEndAllowed)
grammarEndAllowed in interface IAsn1ContainergrammarEndAllowed - true or false, depending on the next transition
being an end or not.public int getTransition()
getTransition in interface IAsn1Containerpublic void setTransition(int transition)
setTransition in interface IAsn1Containertransition - The transition to setpublic 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 IAsn1ContainerparentTLV - The parent TLV to set.public void clean()
public int getNewTlvId()
getNewTlvId in interface IAsn1Containerpublic int getTlvId()
IAsn1Container
getTlvId in interface IAsn1Container
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||