Package com.asakusafw.utils.java.model.util

Examples of com.asakusafw.utils.java.model.util.CommentEmitTrait


        }

        @Override
        public Statement reset(Expression object) {
            Statement statement = factory.newEmptyStatement();
            statement.putModelTrait(CommentEmitTrait.class, new CommentEmitTrait(Arrays.asList(
                    MessageFormat.format(
                            "Failed to resolve in \"reset\": {0}",
                            runtimeType)
            )));
            return statement;
View Full Code Here


        }

        @Override
        public Expression createNewInstance(Type type) {
            Expression expression = Models.toNullLiteral(factory);
            expression.putModelTrait(CommentEmitTrait.class, new CommentEmitTrait(Arrays.asList(
                    MessageFormat.format(
                            "Failed to resolve in \"createNewInstance\": {0}",
                            runtimeType)
            )));
            return expression;
View Full Code Here

        }

        @Override
        public Statement assign(Expression target, Expression source) {
            Statement statement = factory.newEmptyStatement();
            statement.putModelTrait(CommentEmitTrait.class, new CommentEmitTrait(Arrays.asList(
                    MessageFormat.format(
                            "Failed to resolve in \"assign\": {0}",
                            runtimeType)
            )));
            return statement;
View Full Code Here

        }

        @Override
        public Statement createWriter(Expression object, Expression dataOutput) {
            Statement statement = factory.newEmptyStatement();
            statement.putModelTrait(CommentEmitTrait.class, new CommentEmitTrait(Arrays.asList(
                    MessageFormat.format(
                            "Failed to resolve in \"createWriter\": {0}",
                            runtimeType)
            )));
            return statement;
View Full Code Here

        }

        @Override
        public Statement createReader(Expression object, Expression dataInput) {
            Statement statement = factory.newEmptyStatement();
            statement.putModelTrait(CommentEmitTrait.class, new CommentEmitTrait(Arrays.asList(
                    MessageFormat.format(
                            "Failed to resolve in \"createReader\": {0}",
                            runtimeType)
            )));
            return statement;
View Full Code Here

    }

    private void processCompilationUnitComment(
            CompilationUnit elem,
            EmitContext context) {
        CommentEmitTrait comment =
            elem.findModelTrait(CommentEmitTrait.class);
        if (comment == null) {
            return;
        }
        context.putBlockComment(comment.getContents());
    }
View Full Code Here

        }
        context.putBlockComment(comment.getContents());
    }

    private void processBlockComment(Model elem, EmitContext context) {
        CommentEmitTrait comment =
            elem.findModelTrait(CommentEmitTrait.class);
        if (comment == null) {
            return;
        }
        for (String line : comment.getContents()) {
            context.putLineComment(line);
        }
    }
View Full Code Here

            context.putLineComment(line);
        }
    }

    private void processInlineComment(Model elem, EmitContext context) {
        CommentEmitTrait comment =
            elem.findModelTrait(CommentEmitTrait.class);
        if (comment == null) {
            return;
        }
        for (String line : comment.getContents()) {
            context.putInlineComment(line);
        }
    }
View Full Code Here

        // ヘッダコメントの追加
        if (headerComment != null) {
            unit.putModelTrait(
                    CommentEmitTrait.class,
                    new CommentEmitTrait(headerComment));
        }
        return unit;
    }
View Full Code Here

            if (getClass().getName().equals(elements[i].getClassName()) == false) {
                break;
            }
            lines.add(elements[i].toString());
        }
        unit.putModelTrait(CommentEmitTrait.class, new CommentEmitTrait(lines));
        System.out.println(unit);
        compiler.addSource(new CompilationUnitJavaFile(unit));
        List<Diagnostic<? extends JavaFileObject>> diagnostics = compiler.doCompile();
        if (diagnostics.isEmpty() == false) {
            throw new AssertionError(diagnostics + ":::" + unit);
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.model.util.CommentEmitTrait

Copyright © 2018 www.massapicom. 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.