Examples of EmitContext


Examples of com.asakusafw.dmdl.java.emitter.EmitContext

    public void generateResources(EmitContext context, ModelDeclaration model) throws IOException {
        if (isTarget(model) == false) {
            return;
        }
        checkPropertyType(model);
        EmitContext next = new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                CATEGORY_STREAM,
                "{0}StreamSupport");
        LOG.debug("Generating stream support for {}",
                context.getQualifiedTypeName().toNameString());
        Generator.emit(next, model);
        LOG.debug("Generated stream support for {}: {}",
                context.getQualifiedTypeName().toNameString(),
                next.getQualifiedTypeName().toNameString());
    }
View Full Code Here

Examples of com.asakusafw.dmdl.java.emitter.EmitContext

            }
        }
    }

    private static EmitContext createContext(EmitContext context, ModelDeclaration model) {
        return new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                CATEGORY,
                PATTERN_FACTORY);
View Full Code Here

Examples of com.asakusafw.dmdl.java.emitter.EmitContext

                    f.newClassLiteral(context.resolve(type)))
            .toAnnotations();
    }

    private Type generate(EmitContext context, ModelDeclaration model) throws IOException {
        EmitContext next = new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                NameConstants.CATEGORY_IO,
                "{0}Output");
        Generator.emit(next, model);
        return context.resolve(next.getQualifiedTypeName());
    }
View Full Code Here

Examples of com.asakusafw.dmdl.java.emitter.EmitContext

                    f.newClassLiteral(context.resolve(type)))
            .toAnnotations();
    }

    private Type generate(EmitContext context, ModelDeclaration model) throws IOException {
        EmitContext next = new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                NameConstants.CATEGORY_IO,
                "{0}Input");
        Generator.emit(next, model);
        return context.resolve(next.getQualifiedTypeName());
    }
View Full Code Here

Examples of com.asakusafw.dmdl.java.emitter.EmitContext

        generateInputDescription(context, formatClassName, model);
        generateOutputDescription(context, formatClassName, model);
    }

    private static EmitContext createContext(EmitContext context, ModelDeclaration model) {
        return new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                CATEGORY,
                PATTERN_FORMAT);
View Full Code Here

Examples of com.asakusafw.dmdl.java.emitter.EmitContext

                PATTERN_FORMAT);
    }

    private void generateInputDescription(
            EmitContext context, Name formatClassName, ModelDeclaration model) throws IOException {
        EmitContext next = new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                CATEGORY,
                PATTERN_INPUT_DESCRIPTION);
View Full Code Here

Examples of com.asakusafw.dmdl.java.emitter.EmitContext

        DirectFileInputDescriptionGenerator.generate(next, desc);
    }

    private void generateOutputDescription(
            EmitContext context, Name formatClassName, ModelDeclaration model) throws IOException {
        EmitContext next = new EmitContext(
                context.getSemantics(),
                context.getConfiguration(),
                model,
                CATEGORY,
                PATTERN_OUTPUT_DESCRIPTION);
View Full Code Here

Examples of juzu.impl.template.spi.EmitContext

        // If it's the cache we do nothing
        if (!emitted.contains(path)) {
          //
          try {
            EmitContext emitCtx = new EmitContext() {

              @Override
              public TagHandler resolveTagHandler(String name) {
                return owner.resolveTagHandler(name);
              }
View Full Code Here

Examples of juzu.impl.template.spi.EmitContext

          0,
          0);
      processPhase.process(templateModel);

      // Emit
      EmitPhase emitPhase = new EmitPhase(new EmitContext(){
        @Override
        public TagHandler resolveTagHandler(String name) {
          if ("title".equals(name)) {
            return new TitleTag();
          } else {
View Full Code Here

Examples of juzu.impl.template.spi.EmitContext

    });
    Path.Absolute template = process.resolveTemplate(Path.parse("index.gtmpl"));
    assertNotNull(template);

    // Now emit the template
    EmitPhase emit = new EmitPhase(new EmitContext(){
      public TagHandler resolveTagHandler(String name) {
        if ("decorate".equals(name)) {
          return new DecorateTag();
        } else {
          return null;
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.