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

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


                new JavadocBuilder(factory)
                    .code(flowClass.getElement().getSimpleName().toString())
                    .text("に対する演算子ファクトリークラス。")
                    .seeType(new Jsr269(factory).convert(environment.getErasure(flowClass.getElement().asType())))
                    .toJavadoc(),
                new AttributeBuilder(factory)
                    .annotation(util.t(Generated.class), util.v("{0}:{1}",
                            FlowOperatorCompiler.class.getSimpleName(),
                            FlowOperatorCompiler.VERSION))
                    .annotation(util.t(OperatorFactory.class),
                            factory.newClassLiteral(util.t(flowClass.getElement())))
View Full Code Here


        return factory.newClassDeclaration(
                new JavadocBuilder(factory)
                    .inline(flowClass.getDocumentation())
                    .seeType(new Jsr269(factory).convert(environment.getErasure(flowClass.getElement().asType())))
                    .toJavadoc(),
                new AttributeBuilder(factory)
                    .Public()
                    .Static()
                    .Final()
                    .toAttributes(),
                name,
View Full Code Here

    }

    private FieldDeclaration createResolverField() {
        return factory.newFieldDeclaration(
                null,
                new AttributeBuilder(factory)
                    .Private()
                    .Final()
                    .toAttributes(),
                util.t(FlowElementResolver.class),
                factory.newSimpleName(RESOLVER_FIELD_NAME),
View Full Code Here

                    .exception(util.t(IllegalArgumentException.class))
                        .text("引数に")
                        .code("null")
                        .text("が指定された場合")
                    .toJavadoc(),
                new AttributeBuilder(factory)
                    .Public()
                    .toAttributes(),
                getType(objectType),
                factory.newSimpleName("as"),
                Collections.singletonList(factory.newFormalParameterDeclaration(
View Full Code Here

                    .param(optimize)
                        .text("trueならば最適化を行い、falseならばステージ構成を保持する")
                    .returns()
                        .text("この演算子オブジェクト (this)")
                    .toJavadoc(),
                new AttributeBuilder(factory)
                    .Public()
                    .toAttributes(),
                getType(objectType),
                factory.newSimpleName("inlined"),
                Collections.singletonList(factory.newFormalParameterDeclaration(
View Full Code Here

        assert names != null;
        return factory.newFieldDeclaration(
                new JavadocBuilder(factory)
                    .inline(var.getDocumentation())
                    .toJavadoc(),
                new AttributeBuilder(factory)
                    .Public()
                    .Final()
                    .toAttributes(),
                util.toSourceType(var.getType().getRepresentation()),
                factory.newSimpleName(names.reserve(var.getName())),
View Full Code Here

        List<Statement> statements = createBodyForConstructor(parameters, names);

        return factory.newConstructorDeclaration(
                null,
                new AttributeBuilder(factory)
                    // Default Package Access
                    .toAttributes(),
                objectType.getName().getLastSegment(),
                parameters,
                statements);
View Full Code Here

        Type type = getType(objectType);
        javadoc.returns().text("生成した演算子オブジェクト");
        javadoc.seeType(util.t(flowClass.getElement()));
        return factory.newMethodDeclaration(
                javadoc.toJavadoc(),
                new AttributeBuilder(factory)
                    .annotation(util.t(OperatorInfo.class),
                            "kind", factory.newClassLiteral(util.t(FlowPart.class)),
                            "input", factory.newArrayInitializer(inputMetaData),
                            "output", factory.newArrayInitializer(outputMetaData),
                            "parameter", factory.newArrayInitializer(parameterMetaData))
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)
                        .annotation(importer.toType(TraceLocation.class), createTraceLocationElements())
                        .Public()
                        .toAttributes(),
                    name,
                    Collections.<TypeParameterDeclaration>emptyList(),
View Full Code Here

            List<Statement> statements = Lists.create();
            statements.add(new ExpressionBuilder(factory, Models.toLiteral(factory, slot.getSource().getOutputName()))
                .toReturnStatement());
            return factory.newMethodDeclaration(
                    null,
                    new AttributeBuilder(factory)
                        .annotation(importer.toType(Override.class))
                        .Public()
                        .toAttributes(),
                    importer.toType(String.class),
                    factory.newSimpleName(SlotDirectMapper.NAME_GET_OUTPUT_NAME),
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.