Examples of accept()


Examples of jetbrick.template.parser.grammer.JetTemplateParser.ExpressionContext.accept()

        assert_inside_of_for_directive(ctx, "#break");

        ExpressionContext expression = ctx.expression();
        String source;
        if (expression != null) {
            SegmentCode c = (SegmentCode) expression.accept(this);
            source = get_if_expression_source(c);
        } else {
            source = "true";
        }
        source = "if (" + source + ") break; // line: " + ctx.getStart().getLine();
View Full Code Here

Examples of jetbrick.template.parser.grammer.JetTemplateParser.Expression_listContext.accept()

    }

    @Override
    public Code visitInclude_directive(Include_directiveContext ctx) {
        Expression_listContext expression_list = ctx.expression_list();
        SegmentListCode childrenCode = (SegmentListCode) expression_list.accept(this);
        if (childrenCode.size() > 2) {
            throw reportError("Arguments mismatch for #include directive.", ctx);
        }

        // argument 1: file
View Full Code Here

Examples of jetbrick.template.parser.grammer.JetTemplateParser.Hash_map_entry_listContext.accept()

    @Override
    public Code visitExpr_hash_map(Expr_hash_mapContext ctx) {
        String source = "Collections.EMPTY_MAP";
        Hash_map_entry_listContext hash_map_entry_list = ctx.hash_map_entry_list();
        if (hash_map_entry_list != null) {
            Code code = hash_map_entry_list.accept(this);
            source = "JetUtils.asMap(" + code.toString() + ")";
        }
        return new SegmentCode(Map.class, source, ctx);
    }
View Full Code Here

Examples of jetbrick.template.parser.grammer.JetTemplateParser.TemplateContext.accept()

        parser.addErrorListener(JetTemplateErrorListener.getInstance());
        parser.setErrorHandler(new JetTemplateErrorStrategy());

        TemplateContext templateParseTree = parser.template();
        JetTemplateCodeVisitor visitor = new JetTemplateCodeVisitor(engine, engine.getVariableResolver(), engine.getSecurityManager(), parser, resource);
        Code code = templateParseTree.accept(visitor);
        return code.toString();
    }

    public void render(Map<String, Object> context, Writer out) {
        JetContext ctx = new JetContext(context);
View Full Code Here

Examples of jetbrick.template.parser.grammer.JetTemplateParser.TypeContext.accept()

        TypedKlass lhs = null; // 变量类型
        TypeContext type = ctx.type();
        if (type != null) {
            defining = true;
            // 定义一个变量
            SegmentCode c = (SegmentCode) type.accept(this);
            lhs = c.getTypedKlass();
            if (!scopeCode.define(name, lhs)) {
                throw reportError("Duplicate local variable " + name, ctx.IDENTIFIER());
            }
        } else {
View Full Code Here

Examples of jetbrick.template.parser.grammer.JetTemplateParser.Type_argumentsContext.accept()

        // 查找泛型类型 typeArgs
        TypedKlass[] typeArgs = TypedKlass.EMPTY_TYPE_ARGS;
        Type_argumentsContext type_arguments = ctx.type_arguments();
        if (type_arguments != null) {
            SegmentListCode c = (SegmentListCode) type_arguments.accept(this);
            typeArgs = new TypedKlass[c.size()];
            for (int i = 0; i < typeArgs.length; i++) {
                typeArgs[i] = c.getChild(i).getTypedKlass();
            }
        }
View Full Code Here

Examples of jodd.asm5.ClassReader.accept()

      throw new ProxettaException("Error reading class input stream", ioex);
    }

    // reads information
    TargetClassInfoReader targetClassInfoReader = new TargetClassInfoReader();
    classReader.accept(targetClassInfoReader, 0);

    this.destClassWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);

    // create proxy
    if (log.isDebugEnabled()) {
View Full Code Here

Examples of jodd.asm5.signature.SignatureReader.accept()


  private String resolveSignature(String signature) {
    SignatureReader signatureReader = new SignatureReader("(" + signature + ")V");
    StringBuilder sb = new StringBuilder();
    signatureReader.accept(new TraceSignatureVisitor(sb, true));
    return sb.toString();
  }

}
View Full Code Here

Examples of jodd.petite.scope.ProtoScope.accept()

    assertTrue(singletonScope.accept(singletonScope));
    assertFalse(singletonScope.accept(protoScope));
    assertFalse(singletonScope.accept(sessionScope));
    assertFalse(singletonScope.accept(requestScope));

    assertTrue(protoScope.accept(singletonScope));
    assertTrue(protoScope.accept(protoScope));
    assertTrue(protoScope.accept(sessionScope));
    assertTrue(protoScope.accept(requestScope));

    assertTrue(sessionScope.accept(singletonScope));
View Full Code Here

Examples of jodd.petite.scope.RequestScope.accept()

    assertTrue(sessionScope.accept(singletonScope));
    assertFalse(sessionScope.accept(protoScope));
    assertTrue(sessionScope.accept(sessionScope));
    assertFalse(sessionScope.accept(requestScope));

    assertTrue(requestScope.accept(singletonScope));
    assertFalse(requestScope.accept(protoScope));
    assertTrue(requestScope.accept(sessionScope));
    assertTrue(requestScope.accept(requestScope));
  }
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.