public static final class RecipeSymbol.Builder extends Object
RecipeSymbol object. In order to create the
this builder, one has to use the static method defined in
RecipeSymbol.
Following is an example of how this can be done.
RecipeSymbol.Builder builder = RecipeSymbol.builder();
builder.createTokenGroup(...);
builder.addToken(...);
builder.addVersion(...);
builder.addLoadableDirective(...);
RecipeSymbol compiled = builder.build();
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLoadableDirective(String directive)
A Recipe can specify the pragma instructions for loading the directives
dynamically.
|
void |
addToken(Token token)
This method provides a way to add a
Token to the TokenGroup. |
void |
addVersion(String version)
Recipe can specify the version of the grammar.
|
RecipeSymbol |
build()
Returns a fully constructed and valid
RecipeSymbol object. |
void |
createTokenGroup(SourceInfo info)
TokenGroup is created for each directive in
the recipe. |
public void createTokenGroup(SourceInfo info)
TokenGroup is created for each directive in
the recipe. This method creates a new TokenGroup
by passing the SourceInfo, which represents the
information of the source parsed.info - about the source directive being parsed.public void addToken(Token token)
Token to the TokenGroup.token - to be added to the token group.public void addVersion(String version)
RecipeSymbol.version - of the recipe grammar being used.public void addLoadableDirective(String directive)
directive - to be loaded dynamically.public RecipeSymbol build()
RecipeSymbol object.RecipeSymbolCopyright © 2022 CDAP Licensed under the Apache License, Version 2.0.