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

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


                    ImportBuilder.Strategy.TOP_LEVEL);
        }


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


            this.shuffleNames = Maps.create();
            this.rendezvousNames = Maps.create();
        }

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

                    factory.newPackageDeclaration(packageName),
                    Strategy.TOP_LEVEL);
        }

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

                    factory.newPackageDeclaration(envinronment.getEpiloguePackageName(moduleId)),
                    Strategy.TOP_LEVEL);
        }

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

                    factory.newPackageDeclaration(packageName),
                    ImportBuilder.Strategy.TOP_LEVEL);
        }

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

                    shuffle.getCompiled().getValueTypeName()));
            this.connection = new FragmentConnection(environment, fragment, names, importer);
        }

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

                    ImportBuilder.Strategy.TOP_LEVEL);
        }


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

        }

        abstract SimpleName getClassSimpleName();

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

                    factory.newPackageDeclaration(packageName),
                    ImportBuilder.Strategy.TOP_LEVEL);
        }

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

     * 単純なテスト。
     */
    @Test
    public void simple() {
        add("com.example.Simple");
        TypeDeclaration tree = generate(new MockOperatorProcessor());
        assertThat(tree.getName().getToken(), is("SimpleFactory"));
        assertThat(Find.modifiers(tree), hasItem(PUBLIC));
        assertThat(Find.modifiers(tree), not(hasItem(ABSTRACT)));

        TypeDeclaration type = Find.type(tree, "Example");
        assertThat(type.getModelKind(), is(ModelKind.CLASS_DECLARATION));
        assertThat(Find.modifiers(type), hasItem(PUBLIC));

        FieldDeclaration field = Find.field(type, "out");
        assertThat(Find.modifiers(field), hasItems(PUBLIC, FINAL));
        assertThat(field.getType().toString(), is("Source<CharSequence>"));
View Full Code Here

TOP

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

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.