Class AbstractGrammar<C extends Asn1Container>
java.lang.Object
org.apache.directory.api.asn1.ber.grammar.AbstractGrammar<C>
- Type Parameters:
C- The container type
- All Implemented Interfaces:
Grammar<C>
The abstract Grammar which is the Mother of all the grammars. It contains
the transitions table.
- Author:
- Apache Directory Project
-
Nested Class Summary
Nested classes/interfaces inherited from interface Grammar
Grammar.FollowUp -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteAction(C container) This method, when called, execute an action on the current data stored in the container.getName()Get the grammar namegetTransition(Enum<?> state, int tag) Get the transition associated with the state and tagvoidSet the grammar's name
-
Field Details
-
transitions
Table of transitions. It's a two dimension array, the first dimension indices the states, the second dimension indices the Tag value, so it is 256 wide.
-
-
Constructor Details
-
AbstractGrammar
public AbstractGrammar()Default constructor
-
-
Method Details
-
getName
Get the grammar name- Specified by:
getNamein interfaceGrammar<C extends Asn1Container>- Returns:
- Return the grammar's name
-
setName
Set the grammar's name- Specified by:
setNamein interfaceGrammar<C extends Asn1Container>- Parameters:
name- The grammar name
-
getTransition
Get the transition associated with the state and tag- Parameters:
state- The current statetag- The current tag- Returns:
- A valid transition if any, or null.
-
executeAction
This method, when called, execute an action on the current data stored in the container.- Specified by:
executeActionin interfaceGrammar<C extends Asn1Container>- Parameters:
container- Store the data being processed.- Throws:
org.apache.directory.api.asn1.DecoderException- Thrown when an unrecoverable error occurs.
-