Examples of toType()


Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

         */
        public void addAttribute(Enum<? extends FlowElementAttribute> constant) {
            Precondition.checkMustNotBeNull(constant, "constant"); //$NON-NLS-1$
            ModelFactory f = context.environment.getFactory();
            ImportBuilder ib = context.importer;
            Expression attribute = new TypeBuilder(f, ib.toType(constant.getDeclaringClass()))
                .field(constant.name())
                .toExpression();
            addAttribute(attribute);
        }

View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

                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[] {
                        // name
                        Models.toLiteral(f, helperMethod.getSimpleName().toString()),
                        // parameter types
                        new TypeBuilder(f, ib.toType(Arrays.class))
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

            Expression attribute = new TypeBuilder(f, ib.toType(OperatorHelper.class))
                .newObject(new Expression[] {
                        // name
                        Models.toLiteral(f, helperMethod.getSimpleName().toString()),
                        // parameter types
                        new TypeBuilder(f, ib.toType(Arrays.class))
                            .method("asList", new TypeBuilder(f, ib.toType(Class.class))
                                .parameterize(f.newWildcard())
                                .array(1)
                                .newArray(f.newArrayInitializer(parameterTypeLiterals))
                                .toExpression())
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

                .newObject(new Expression[] {
                        // name
                        Models.toLiteral(f, helperMethod.getSimpleName().toString()),
                        // parameter types
                        new TypeBuilder(f, ib.toType(Arrays.class))
                            .method("asList", new TypeBuilder(f, ib.toType(Class.class))
                                .parameterize(f.newWildcard())
                                .array(1)
                                .newArray(f.newArrayInitializer(parameterTypeLiterals))
                                .toExpression())
                            .toExpression()
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

        arguments.add(classLiteralOrNull(f, importer, key));
        arguments.add(classLiteralOrNull(f, importer, value));
        return emitConstructorClass(
                className,
                f.newParameterizedType(
                        importer.toType(AbstractDirectOutputMapper.class),
                        importer.toType(slot.valueType)),
                importer,
                arguments);
    }
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

        arguments.add(classLiteralOrNull(f, importer, value));
        return emitConstructorClass(
                className,
                f.newParameterizedType(
                        importer.toType(AbstractDirectOutputMapper.class),
                        importer.toType(slot.valueType)),
                importer,
                arguments);
    }

    private Name emitOutputMapper(Slot slot, int index) throws IOException {
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

                f,
                f.newPackageDeclaration(environment.getEpiloguePackageName(moduleId)),
                Strategy.TOP_LEVEL);
        importer.resolvePackageMember(className);
        List<Expression> arguments = Lists.create();
        arguments.add(f.newClassLiteral(importer.toType(slot.valueType)));
        arguments.add(Models.toLiteral(f, slot.basePath));
        arguments.add(Models.toLiteral(f, slot.resourcePath));
        arguments.add(f.newClassLiteral(importer.toType(slot.formatClass)));

        return emitConstructorClass(
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

        importer.resolvePackageMember(className);
        List<Expression> arguments = Lists.create();
        arguments.add(f.newClassLiteral(importer.toType(slot.valueType)));
        arguments.add(Models.toLiteral(f, slot.basePath));
        arguments.add(Models.toLiteral(f, slot.resourcePath));
        arguments.add(f.newClassLiteral(importer.toType(slot.formatClass)));

        return emitConstructorClass(
                className,
                f.newParameterizedType(
                        importer.toType(AbstractNoReduceDirectOutputMapper.class),
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

        arguments.add(f.newClassLiteral(importer.toType(slot.formatClass)));

        return emitConstructorClass(
                className,
                f.newParameterizedType(
                        importer.toType(AbstractNoReduceDirectOutputMapper.class),
                        importer.toType(slot.valueType)),
                importer,
                arguments);
    }
View Full Code Here

Examples of com.asakusafw.utils.java.model.util.ImportBuilder.toType()

        return emitConstructorClass(
                className,
                f.newParameterizedType(
                        importer.toType(AbstractNoReduceDirectOutputMapper.class),
                        importer.toType(slot.valueType)),
                importer,
                arguments);
    }

    private Name emitWithSpecs(String classNameString, Class<?> baseClass, List<Slot> slots) throws IOException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.