|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.asn1new.ber.grammar.AbstractGrammar
The abstract IGrammar which is the Mother of all the grammars. It contains the transitions table.
Field Summary | |
private static boolean |
DEBUG
A speedup for logs |
private static org.slf4j.Logger |
log
The logger |
protected java.lang.String |
name
The grammar name |
protected IStates |
statesEnum
The grammar's states |
protected GrammarTransition[][] |
transitions
Table of transitions. |
Constructor Summary | |
AbstractGrammar()
|
Method Summary | |
protected void |
checkLength(Asn1Object object,
TLV tlv)
Checks the Length. |
void |
executeAction(IAsn1Container container)
The main function. |
java.lang.String |
getName()
Return the grammar's name |
IStates |
getStatesEnum()
Get the states of the current grammar |
GrammarTransition |
getTransition(int state,
int tag)
Get the transition associated with the state and tag |
void |
setName(java.lang.String name)
Set the grammar's name |
void |
setStatesEnum(IStates statesEnum)
Set the states for this grammar |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.slf4j.Logger log
private static boolean DEBUG
protected GrammarTransition[][] transitions
protected java.lang.String name
protected IStates statesEnum
Constructor Detail |
public AbstractGrammar()
Method Detail |
public java.lang.String getName()
getName
in interface IGrammar
public void setName(java.lang.String name)
setName
in interface IGrammar
name
- DOCUMENT ME!protected void checkLength(Asn1Object object, TLV tlv) throws org.apache.asn1.codec.DecoderException
object
- The Object that is being decoded.tlv
- The current TLV
org.apache.asn1.codec.DecoderException
- Thrown if the expected length is lower than the sum
of all the included elements.public GrammarTransition getTransition(int state, int tag)
state
- The current statetag
- The current tag
public void executeAction(IAsn1Container container) throws org.apache.asn1.codec.DecoderException
executeAction
in interface IGrammar
container
- The Asn1Container
org.apache.asn1.codec.DecoderException
- Thrown if anything went wrongpublic IStates getStatesEnum()
getStatesEnum
in interface IGrammar
public void setStatesEnum(IStates statesEnum)
statesEnum
- The statesEnum to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |