Package com.asakusafw.utils.java.model.syntax

Examples of com.asakusafw.utils.java.model.syntax.ClassDeclaration


                name);
        return name;
    }

    private CompilationUnit generate() {
        ClassDeclaration type = createType();
        return factory.newCompilationUnit(
                importer.getPackageDeclaration(),
                importer.toImportDeclarations(),
                Collections.singletonList(type),
                Collections.<Comment>emptyList());
View Full Code Here


            SupportGenerator emitter = new SupportGenerator(context, model, conf);
            emitter.emit();
        }

        private void emit() throws IOException {
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("Supports CSV for ")
                        .linkType(context.resolve(model.getSymbol()))
                        .text(".")
                        .toJavadoc(),
View Full Code Here

            DescriptionGenerator emitter = new DescriptionGenerator(context, model, supportClassName, false);
            emitter.emit();
        }

        private void emit() throws IOException {
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("An abstract implementation of ")
                        .linkType(context.resolve(model.getSymbol()))
                        .text(" {0} description using WindGate JDBC",
                                importer ? "importer" : "exporter")
View Full Code Here

            DescriptionGenerator emitter = new DescriptionGenerator(context, model, supportClassName, false);
            emitter.emit();
        }

        private void emit() throws IOException {
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("An abstract implementation of ")
                        .linkType(context.resolve(model.getSymbol()))
                        .text(" {0} description using WindGate CSV",
                                importer ? "importer" : "exporter")
View Full Code Here

            SupportGenerator emitter = new SupportGenerator(context, model);
            emitter.emit();
        }

        private void emit() throws IOException {
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("Supports JDBC interfaces for ",
                                model.getName())
                        .linkType(context.resolve(model.getSymbol()))
                        .text(".")
View Full Code Here

     * 具象メソッドに対する実装が存在しない。
     */
    @Test
    public void concrete() {
        add("com.example.Concrete");
        ClassDeclaration tree = generate(new MockOperatorProcessor());
        assertThat(Find.modifiers(tree), hasItem(PUBLIC));
        assertThat(Find.modifiers(tree), not(hasItem(ABSTRACT)));
        assertThat(tree.getName().getToken(), is("ConcreteImpl"));
        assertThat(tree.getSuperClass().toString(), is("Concrete"));

        // オーバーライド
        assertThat(Find.method(tree, "example"), is(nullValue()));
    }
View Full Code Here

     * 抽象メソッドに対する実装が行われる。
     */
    @Test
    public void skeleton() {
        add("com.example.Abstract");
        ClassDeclaration tree = generate(new MockOperatorProcessor());
        assertThat(Find.modifiers(tree), hasItem(PUBLIC));
        assertThat(Find.modifiers(tree), not(hasItem(ABSTRACT)));
        assertThat(tree.getName().getToken(), is("AbstractImpl"));
        assertThat(tree.getSuperClass().toString(), is("Abstract"));

        // オーバーライド
        MethodDeclaration method = Find.method(tree, "example");
        assertThat(method, not(nullValue()));
        assertThat(Find.modifiers(method), hasItem(PUBLIC));
View Full Code Here

        }

        private void emit() throws IOException {
            Class<?> superClass = isHadoopConfRequired() ? ConfigurableBinaryStreamFormat.class
                    : BinaryStreamFormat.class;
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("TSV format for ")
                        .linkType(context.resolve(model.getSymbol()))
                        .text(".")
                        .toJavadoc(),
View Full Code Here

        }

        private void emit() throws IOException {
            Class<?> superClass = isHadoopConfRequired() ? ConfigurableBinaryStreamFormat.class
                    : BinaryStreamFormat.class;
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("CSV format for ")
                        .linkType(context.resolve(model.getSymbol()))
                        .text(".")
                        .toJavadoc(),
View Full Code Here

            DescriptionGenerator emitter = new DescriptionGenerator(context, model, supportClassName, false);
            emitter.emit();
        }

        private void emit() throws IOException {
            ClassDeclaration decl = f.newClassDeclaration(
                    new JavadocBuilder(f)
                        .text("An abstract implementation of ")
                        .linkType(context.resolve(model.getSymbol()))
                        .text(" {0} description using Direct I/O TSV",
                                importer ? "importer" : "exporter")
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.model.syntax.ClassDeclaration

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.