public final class MigrateToV2 extends Object implements GrammarMigrator
MigrateToV2 translates from older version
of grammar of directives into newer version of recipe grammar.
Following are the conversions that are performed :
| Constructor and Description |
|---|
MigrateToV2(List<String> recipe) |
MigrateToV2(String recipe) |
MigrateToV2(String[] recipe) |
MigrateToV2(String recipe,
String delimiter) |
| Modifier and Type | Method and Description |
|---|---|
static String |
getNextToken(StringTokenizer tokenizer,
String directive,
String field,
int lineno) |
static String |
getNextToken(StringTokenizer tokenizer,
String delimiter,
String directive,
String field,
int lineno) |
static String |
getNextToken(StringTokenizer tokenizer,
String delimiter,
String directive,
String field,
int lineno,
boolean optional) |
String |
migrate()
Rewrites the directives in version 1.0 to version 2.0.
|
public MigrateToV2(String[] recipe)
public MigrateToV2(String recipe)
public String migrate() throws DirectiveParseException
migrate in interface GrammarMigratorDirectiveParseExceptionpublic static String getNextToken(StringTokenizer tokenizer, String directive, String field, int lineno) throws DirectiveParseException
DirectiveParseExceptionpublic static String getNextToken(StringTokenizer tokenizer, String delimiter, String directive, String field, int lineno) throws DirectiveParseException
DirectiveParseExceptionpublic static String getNextToken(StringTokenizer tokenizer, String delimiter, String directive, String field, int lineno, boolean optional) throws DirectiveParseException
DirectiveParseExceptionCopyright © 2021 CDAP Licensed under the Apache License, Version 2.0.