Package com.asakusafw.utils.java.jsr269.bridge

Examples of com.asakusafw.utils.java.jsr269.bridge.Jsr269


     * @return 型のモデル
     * @throws IllegalArgumentException 引数に{@code null}が含まれる場合
     */
    public final Type t(TypeMirror type) {
        Precondition.checkMustNotBeNull(type, "type"); //$NON-NLS-1$
        return importer.resolve(new Jsr269(factory).convert(type));
    }
View Full Code Here


     * @throws IllegalArgumentException 引数に{@code null}が含まれる場合
     */
    public final Type t(TypeElement type) {
        Precondition.checkMustNotBeNull(type, "type"); //$NON-NLS-1$
        DeclaredType t = environment.getTypeUtils().getDeclaredType(type);
        return importer.resolve(new Jsr269(factory).convert(t));
    }
View Full Code Here

         */
        public void addOperatorHelper(ExecutableElement helperMethod) {
            Precondition.checkMustNotBeNull(helperMethod, "helperMethod"); //$NON-NLS-1$
            ModelFactory f = context.environment.getFactory();
            ImportBuilder ib = context.importer;
            Jsr269 conv = new Jsr269(f);
            List<Expression> parameterTypeLiterals = Lists.create();
            for (VariableElement parameter : helperMethod.getParameters()) {
                TypeMirror type = context.environment.getErasure(parameter.asType());
                parameterTypeLiterals.add(new TypeBuilder(f, ib.resolve(conv.convert(type)))
                    .dotClass()
                    .toExpression());
            }
            Expression attribute = new TypeBuilder(f, ib.toType(OperatorHelper.class))
                .newObject(new Expression[] {
View Full Code Here

    private PackageDeclaration getPackage(
            ModelFactory factory,
            OperatorClass operatorClass) {
        PackageElement parent = (PackageElement) operatorClass.getElement().getEnclosingElement();
        return new Jsr269(factory).convert(parent);
    }
View Full Code Here

            OperatorClassGenerator generator = new OperatorFactoryClassGenerator(
                    env,
                    factory,
                    new ImportBuilder(
                            factory,
                            new Jsr269(factory).convert(pkg),
                            Strategy.TOP_LEVEL),
                            operatorClass);
            return generator.generate();
        }
View Full Code Here

                getObjectClassName()));
        return factory.newClassDeclaration(
                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))
View Full Code Here

                Models.append(factory, getClassName(), name));
        List<TypeBodyDeclaration> members = createObjectMembers(objectType);
        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()
View Full Code Here

    private PackageDeclaration getPackage(
            ModelFactory factory,
            FlowPartClass aClass) {
        PackageElement parent = (PackageElement) aClass.getElement().getEnclosingElement();
        return new Jsr269(factory).convert(parent);
    }
View Full Code Here

        Precondition.checkMustNotBeNull(context, "context"); //$NON-NLS-1$
        this.element = context.element;
        this.factory = context.environment.getFactory();
        this.importer = context.importer;
        this.names = context.names;
        this.converter = new Jsr269(factory);
        this.statements = Lists.create();
        this.fields = Lists.create();
    }
View Full Code Here

            OperatorClassGenerator generator = new OperatorImplementationClassGenerator(
                    env,
                    factory,
                    new ImportBuilder(
                            factory,
                            new Jsr269(factory).convert(pkg),
                            Strategy.TOP_LEVEL),
                            operatorClass);
            return generator.generate();
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.jsr269.bridge.Jsr269

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.