@PublicEvolving public final class RecipeSymbol extends Object
RecipeSymbol stores information about all the
TokenGroup ( TokenGroup represents a collection of tokens
generated from parsing a single directive). The object also contains
information about the directives (or plugins) that need to be loaded
at the startup time.
This class provides some useful methods for accessing the list of directives or plugins that need to be loaded, the token groups for all the directives tokenized and parsed.
This class exposes a builder pattern for constructing the object.
in the RecipeVisitor. The RecipeVisitor
constructs RecipeSymbol using the RecipeSymbol.Builder
| Modifier and Type | Class and Description |
|---|---|
static class |
RecipeSymbol.Builder
This inner class provides a builder pattern for building
the
RecipeSymbol object. |
| Modifier and Type | Method and Description |
|---|---|
static RecipeSymbol.Builder |
builder()
Static method for creating an instance of the
RecipeSymbol.Builder. |
Set<String> |
getLoadableDirectives()
Returns a set of dynamically loaded directives as plugins.
|
String |
getVersion()
Returns the version of the grammar as specified in the recipe.
|
Iterator<TokenGroup> |
iterator()
Returns an iterator to the list of token groups maintained by this object.
|
int |
size()
Returns number of groups tokenized and parsed.
|
com.google.gson.JsonElement |
toJson()
This method
toJson returns the JsonElement object
representation of this object. |
public Set<String> getLoadableDirectives()
If there are no directives specified in the recipe, then there would be no plugins to be loaded.
public String getVersion()
#pragma version 2.0;public int size()
Fewer than number of directives is because of the '#pragma' directives
public Iterator<TokenGroup> iterator()
public static RecipeSymbol.Builder builder()
RecipeSymbol.Builder.public com.google.gson.JsonElement toJson()
toJson returns the JsonElement object
representation of this object.JsonElement representing this object.Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.