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

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


                .assignFrom(chain)
                .toStatement());
        }
        return factory.newConstructorDeclaration(
                javadoc.toJavadoc(),
                new AttributeBuilder(factory)
                    .Public()
                    .toAttributes(),
                className,
                parameters,
                statements);
View Full Code Here


    private FieldDeclaration createResourceField(ResourceFragment resource) {
        assert resource != null;
        return factory.newFieldDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .Final()
                    .toAttributes(),
                importer.toType(resource.getCompiled().getQualifiedName()),
                getResource(resource.getDescription()),
View Full Code Here

    private FieldDeclaration createOutputField(FlowElementOutput output) {
        assert output != null;
        return factory.newFieldDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .Final()
                    .toAttributes(),
                importer.resolve(factory.newParameterizedType(
                        Models.toType(factory, Result.class),
View Full Code Here

            importer.resolvePackageMember(name);
            return factory.newClassDeclaration(
                    new JavadocBuilder(factory)
                        .text("Mapper for output \"{0}\" in epilogue phase.", slot.getSource().getOutputName())
                        .toJavadoc(),
                    new AttributeBuilder(factory)
                        .Public()
                        .toAttributes(),
                    name,
                    Collections.<TypeParameterDeclaration>emptyList(),
                    new TypeBuilder(factory, importer.toType(SlotDistributor.class))
View Full Code Here

                        .toStatement());
                }
            }
            return factory.newMethodDeclaration(
                    null,
                    new AttributeBuilder(factory)
                        .annotation(importer.toType(Override.class))
                        .Protected()
                        .toAttributes(),
                    Collections.<TypeParameterDeclaration>emptyList(),
                    importer.toType(void.class),
View Full Code Here

        Precondition.checkMustNotBeNull(name, "name"); //$NON-NLS-1$
        SimpleName fieldName = names.create(name);
        Type fieldType = importer.resolve(type);
        fields.add(factory.newFieldDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .toAttributes(),
                fieldType,
                fieldName,
                new TypeBuilder(factory, fieldType)
View Full Code Here

    }

    private MethodDeclaration toMethodDeclaration() {
        return factory.newMethodDeclaration(
                null,
                new AttributeBuilder(factory)
                    .annotation(importer.toType(Override.class))
                    .Public()
                    .toAttributes(),
                toTypeParameters(),
                importer.resolve(converter.convert(element.getReturnType())),
View Full Code Here

                            .toReturnStatement(),
                        new ExpressionBuilder(factory, Models.toLiteral(factory, +1))
                            .toReturnStatement()));
        return factory.newMethodDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .toAttributes(),
                factory.newBasicType(BasicTypeKind.INT),
                factory.newSimpleName(COMPARE_INT),
                Arrays.asList(new FormalParameterDeclaration[] {
View Full Code Here

        SimpleName pid = factory.newSimpleName("pid");
        Statement statement = factory.newSwitchStatement(pid, cases);
        return factory.newMethodDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .toAttributes(),
                factory.newBasicType(BasicTypeKind.INT),
                factory.newSimpleName(PORT_TO_ELEMENT),
                Collections.singletonList(factory.newFormalParameterDeclaration(
View Full Code Here

    private FieldDeclaration createResourceField(ResourceFragment resource, SimpleName name) {
        assert resource != null;
        assert name != null;
        FieldDeclaration field = factory.newFieldDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .toAttributes(),
                importer.toType(resource.getCompiled().getQualifiedName()),
                name,
                null);
View Full Code Here

TOP

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

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.