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

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


        String key = getResourceKey(operatorClass, KEY_SUFFIX_IMPLEMENTATION);
        if (key != null && environment.isResourceGenerated(key)) {
            return;
        }
        ModelFactory f = environment.getFactory();
        PackageDeclaration packageDecl = getPackage(f, operatorClass);
        ImportBuilder imports = getImportBuilder(f, packageDecl);
        OperatorClassGenerator generator = new OperatorImplementationClassGenerator(
                environment,
                f,
                imports,
View Full Code Here


        String key = getResourceKey(operatorClass, KEY_SUFFIX_FACTORY);
        if (key != null && environment.isResourceGenerated(key)) {
            return;
        }
        ModelFactory f = environment.getFactory();
        PackageDeclaration packageDecl = getPackage(f, operatorClass);
        ImportBuilder imports = getImportBuilder(f, packageDecl);
        OperatorClassGenerator generator = new OperatorFactoryClassGenerator(
                environment,
                f,
                imports,
View Full Code Here

        String key = getResourceKey(aClass, KEY_SUFFIX_FACTORY);
        if (key != null && environment.isResourceGenerated(key)) {
            return;
        }
        ModelFactory f = environment.getFactory();
        PackageDeclaration packageDecl = getPackage(f, aClass);
        ImportBuilder imports = getImportBuilder(f, packageDecl);
        FlowFactoryClassGenerator generator = new FlowFactoryClassGenerator(
                environment,
                f,
                imports,
View Full Code Here

     * @return ソースプログラム
     */
    protected CompilationUnit createSource(T model) {

        // パッケージの計算
        PackageDeclaration packageDecl = createPackageDeclaration(model);

        // インポートビルダーの初期化
        imports = new ImportBuilder(f, packageDecl, ImportBuilder.Strategy.TOP_LEVEL);

        // 型宣言の計算
View Full Code Here

    /**
     * 同一パッケージ。
     */
    @Test
    public void current() {
        PackageDeclaration pkg = f.newPackageDeclaration(
            Models.toName(f, "com.example"));
        ImportBuilder importer = new ImportBuilder(f, pkg, Strategy.TOP_LEVEL);
        assertThat(importer.resolve(type("com.example.Test")), is(type("Test")));
        assertImported(importer);
    }
View Full Code Here

    }

    private static String toPath(CompilationUnit unit) {
        assert unit != null;
        StringBuilder buf = new StringBuilder();
        PackageDeclaration packageDeclaration = unit.getPackageDeclaration();
        if (packageDeclaration != null) {
            String pkg = packageDeclaration.getName().toNameString().replace('.', '/');
            buf.append(pkg);
            buf.append('/');
        }
        TypeDeclaration primaryType = findPrimaryType(unit);
        if (primaryType != null) {
View Full Code Here

TOP

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

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.