Examples of imports()


Examples of com.mysema.codegen.ScalaWriter.imports()

        classes.add(NumberExpression.class);
       
        StringWriter w = new StringWriter();
        ScalaWriter writer = new ScalaWriter(w);
        writer.packageDecl("com.mysema.query.scala");
        writer.imports(Expression.class.getPackage());
        for (Class<?> cl : classes) {
            Type type = new ClassType(cl);
            Type superClass = new ClassType(cl.getSuperclass());
            writer.beginClass(type, superClass);
            for (Method m : cl.getDeclaredMethods()) {
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.imports()

    }
   
    @Test
    public void testImportsErrors() throws Exception {
        final ParserImpl p1 = parserImpl("import");
        checkError(list(_UnexpectedToken("a package name", "<EOF>", 1)), list(Imprt._Imprt(NO_COMMENTS, "NO_IDENTIFIER@1")), p1.imports(), p1);
       
        final ParserImpl p2 = parserImpl("import 42");
        checkError(list(_UnexpectedToken("a package name", "'42'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_42@1")), p2.imports(), p2);
       
        final ParserImpl p3 = parserImpl("import boolean");
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.imports()

    public void testImportsErrors() throws Exception {
        final ParserImpl p1 = parserImpl("import");
        checkError(list(_UnexpectedToken("a package name", "<EOF>", 1)), list(Imprt._Imprt(NO_COMMENTS, "NO_IDENTIFIER@1")), p1.imports(), p1);
       
        final ParserImpl p2 = parserImpl("import 42");
        checkError(list(_UnexpectedToken("a package name", "'42'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_42@1")), p2.imports(), p2);
       
        final ParserImpl p3 = parserImpl("import boolean");
        checkError(list(_UnexpectedToken("a package name", "'boolean'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_boolean@1")), p3.imports(), p3);      

        final ParserImpl p4 = parserImpl("import import boolean");
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.imports()

       
        final ParserImpl p2 = parserImpl("import 42");
        checkError(list(_UnexpectedToken("a package name", "'42'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_42@1")), p2.imports(), p2);
       
        final ParserImpl p3 = parserImpl("import boolean");
        checkError(list(_UnexpectedToken("a package name", "'boolean'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_boolean@1")), p3.imports(), p3);      

        final ParserImpl p4 = parserImpl("import import boolean");
        checkError(list(_UnexpectedToken("a package name", "'import'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_import@1")), p4.imports(), p4);      

        final ParserImpl p5 = parserImpl("import package boolean");
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.imports()

       
        final ParserImpl p3 = parserImpl("import boolean");
        checkError(list(_UnexpectedToken("a package name", "'boolean'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_boolean@1")), p3.imports(), p3);      

        final ParserImpl p4 = parserImpl("import import boolean");
        checkError(list(_UnexpectedToken("a package name", "'import'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_import@1")), p4.imports(), p4);      

        final ParserImpl p5 = parserImpl("import package boolean");
        checkError(list(_UnexpectedToken("a package name", "'package'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_package@1")), p5.imports(), p5);      
    }
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.imports()

        final ParserImpl p4 = parserImpl("import import boolean");
        checkError(list(_UnexpectedToken("a package name", "'import'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_import@1")), p4.imports(), p4);      

        final ParserImpl p5 = parserImpl("import package boolean");
        checkError(list(_UnexpectedToken("a package name", "'package'", 1)), list(Imprt._Imprt(NO_COMMENTS, "BAD_IDENTIFIER_package@1")), p5.imports(), p5);      
    }


    private static <A> void checkError(List<SyntaxError> expectedErrors, A expectedResult, A actualResult, ParserImpl p) {
        assertEquals(expectedErrors, p.errors());
View Full Code Here

Examples of com.tinkerpop.gremlin.groovy.engine.ScriptEngines.imports()

        final Object infoToShow;
        if (infoType.equals(Tokens.ARGS_INFO_TYPE_DEPDENENCIES))
            infoToShow = scriptEngines.dependencies();
        else if (infoType.equals(Tokens.ARGS_INFO_TYPE_IMPORTS))
            infoToShow = scriptEngines.imports();
        else {
            // this shouldn't happen if validations are working properly.  will bomb and log as error to server logs
            // thus killing the connection
            throw new RuntimeException(String.format("Validation for the show operation is not properly checking the %s", Tokens.ARGS_INFO_TYPE));
        }
View Full Code Here

Examples of loop.ast.script.Unit.imports()

    do {
      require = require();
      chewEols();

      if (null != require) {
        if (unit.imports().contains(require) && require.alias == null) {
          addError("Duplicate module import: " + require.toSymbol(),
              require.sourceLine, require.sourceColumn);
          throw new LoopCompileException();
        }
View Full Code Here

Examples of loop.ast.script.Unit.imports()

    AsmCodeEmitter codeEmitter = new AsmCodeEmitter(unit);
    this.scope = unit;
    this.compiled = codeEmitter.write(unit);

    requireJavaImports(unit.imports());

    this.source = null;
  }

  public void compileExpression(Unit scope) {
View Full Code Here

Examples of loop.ast.script.Unit.imports()

          shellScope.declare(main);
          shellContext = new HashMap<String, Object>();
          continue;
        }
        if (line.startsWith(":i") || line.startsWith(":imports")) {
          for (RequireDecl requireDecl : shellScope.imports()) {
            System.out.println(requireDecl.toSymbol());
          }
          System.out.println();
          continue;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.