public abstract class AbstractGrammar extends Object implements IGrammar
| Modifier and Type | Field and Description |
|---|---|
protected String |
name
The grammar name
|
protected IStates |
statesEnum
The grammar's states
|
protected GrammarTransition[][] |
transitions
Table of transitions.
|
| Constructor and Description |
|---|
AbstractGrammar()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeAction(IAsn1Container container)
The main function.
|
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(String name)
Set the grammar's name
|
void |
setStatesEnum(IStates statesEnum)
Set the states for this grammar
|
protected GrammarTransition[][] transitions
protected String name
protected IStates statesEnum
public String getName()
public void setName(String name)
public GrammarTransition getTransition(int state, int tag)
state - The current statetag - The current tagpublic void executeAction(IAsn1Container container) throws DecoderException
executeAction in interface IGrammarcontainer - The Asn1ContainerDecoderException - Thrown if anything went wrongpublic IStates getStatesEnum()
getStatesEnum in interface IGrammarpublic void setStatesEnum(IStates statesEnum)
statesEnum - The statesEnum to set.Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.