@Test public void test() throws Exception { assertEquals(expectedType, underTest.buildType(input)); }
public CqlType buildType(String typeString) { CqlTypesLexer lexer = new CqlTypesLexer(new ANTLRInputStream(typeString)); CqlTypesParser parser = new CqlTypesParser(new CommonTokenStream(lexer)); parser.addErrorListener(new BaseErrorListener() { @Override public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { throw new IllegalArgumentException(msg); } }); CqlTypesBaseListenerImpl listener = new CqlTypesBaseListenerImpl(); parser.addParseListener(listener); parser.data_type(); return listener.getCqlType(); }
CqlTypeFactory { public CqlType buildType(String typeString) { CqlTypesLexer lexer = new CqlTypesLexer(new ANTLRInputStream(typeString)); CqlTypesParser parser = new CqlTypesParser(new CommonTokenStream(lexer)); parser.addErrorListener(new BaseErrorListener() { @Override public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { throw new IllegalArgumentException(msg); } }); CqlTypesBaseListenerImpl listener = new CqlTypesBaseListenerImpl(); parser.addParseListener(listener); parser.data_type(); return listener.getCqlType(); } }
CqlTypeFactory { public CqlType buildType(String typeString) { CqlTypesLexer lexer = new CqlTypesLexer(new ANTLRInputStream(typeString)); CqlTypesParser parser = new CqlTypesParser(new CommonTokenStream(lexer)); parser.addErrorListener(new BaseErrorListener() { @Override public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { throw new IllegalArgumentException(msg); } }); CqlTypesBaseListenerImpl listener = new CqlTypesBaseListenerImpl(); parser.addParseListener(listener); parser.data_type(); return listener.getCqlType(); }  }
CqlTypeFactory { public CqlType buildType(String typeString) { CqlTypesLexer lexer = new CqlTypesLexer(new ANTLRInputStream(typeString)); CqlTypesParser parser = new CqlTypesParser(new CommonTokenStream(lexer)); parser.addErrorListener(new BaseErrorListener() { @Override public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { throw new IllegalArgumentException(msg); } }); CqlTypesBaseListenerImpl listener = new CqlTypesBaseListenerImpl(); parser.addParseListener(listener); parser.data_type(); return listener.getCqlType(); }  CqlType buildType(String typeString); }
CqlTypeFactory { public CqlType buildType(String typeString) { CqlTypesLexer lexer = new CqlTypesLexer(new ANTLRInputStream(typeString)); CqlTypesParser parser = new CqlTypesParser(new CommonTokenStream(lexer)); parser.addErrorListener(new BaseErrorListener() { @Override public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { throw new IllegalArgumentException(msg); } }); CqlTypesBaseListenerImpl listener = new CqlTypesBaseListenerImpl(); parser.addParseListener(listener); parser.data_type(); return listener.getCqlType(); }  CqlType buildType(String typeString);  }