Examples of newClassLiteral()


Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

        // port name
        arguments.add(Models.toLiteral(f, tracepoint.getPortName()));

        // data type
        arguments.add(f.newClassLiteral(context.convert(context.getInputPort(0).getDataType())));

        // attributes
        Map<String, String> traceAttributes = new TreeMap<String, String>(attribute.getSetting().getAttributes());
        for (Map.Entry<String, String> entry : traceAttributes.entrySet()) {
            arguments.add(Models.toLiteral(f, entry.getKey()));
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

        }
        ModelFactory f = context.getModelFactory();
        List<Expression> values = new ArrayList<Expression>();
        for (Namer namer : trait.getDataFormatNamers()) {
            Name name = namer.computeName(context, model);
            values.add(f.newClassLiteral(context.resolve(name)));
        }
        return new AttributeBuilder(f)
            .annotation(context.resolve(HiveTable.class), f.newArrayInitializer(values))
            .toAnnotations();
    }
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

    public List<Annotation> getTypeAnnotations(EmitContext context, ModelDeclaration model) throws IOException {
        Type type = generate(context, model);
        ModelFactory f = context.getModelFactory();
        return new AttributeBuilder(f)
            .annotation(context.resolve(ModelOutputLocation.class),
                    f.newClassLiteral(context.resolve(type)))
            .toAnnotations();
    }

    private Type generate(EmitContext context, ModelDeclaration model) throws IOException {
        EmitContext next = new EmitContext(
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

    public List<Annotation> getTypeAnnotations(EmitContext context, ModelDeclaration model) throws IOException {
        Type type = generate(context, model);
        ModelFactory f = context.getModelFactory();
        return new AttributeBuilder(f)
            .annotation(context.resolve(ModelInputLocation.class),
                    f.newClassLiteral(context.resolve(type)))
            .toAnnotations();
    }

    private Type generate(EmitContext context, ModelDeclaration model) throws IOException {
        EmitContext next = new EmitContext(
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

        }

        ModelFactory f = context.getModelFactory();
        List<Annotation> eTerms = Lists.create();
        for (ReduceTerm<?> term : trait.getTerms()) {
            ClassLiteral source = f.newClassLiteral(context.resolve(term.getSource()));
            ArrayInitializer mappings = toMappings(context, term.getMappings());
            Annotation shuffle = toKey(context, term);
            eTerms.addAll(new AttributeBuilder(f)
                .annotation(context.resolve(Joined.Term.class),
                        "source", source, //$NON-NLS-1$
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

        }

        ModelFactory f = context.getModelFactory();
        List<Annotation> eTerms = Lists.create();
        for (ReduceTerm<?> term : trait.getTerms()) {
            ClassLiteral source = f.newClassLiteral(context.resolve(term.getSource()));
            ArrayInitializer mappings = toMappings(context, term.getMappings());
            Annotation shuffle = toKey(context, term);
            eTerms.addAll(new AttributeBuilder(f)
                .annotation(context.resolve(Summarized.Term.class),
                        "source", source, //$NON-NLS-1$
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

                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.syntax.ModelFactory.newClassLiteral()

        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.syntax.ModelFactory.newClassLiteral()

        importer.resolvePackageMember(className);
        List<Expression> elements = Lists.create();
        for (Slot slot : slots) {
            if (requiresReducer(slot)) {
                List<Expression> arguments = Lists.create();
                arguments.add(f.newClassLiteral(importer.toType(slot.valueType)));
                arguments.add(Models.toLiteral(f, slot.basePath));
                arguments.add(f.newClassLiteral(importer.toType(slot.formatClass)));
                arguments.add(f.newClassLiteral(importer.toType(slot.namingClass)));
                arguments.add(f.newClassLiteral(importer.toType(slot.orderClass)));
                elements.add(new TypeBuilder(f, importer.toType(DirectOutputSpec.class))
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newClassLiteral()

        for (Slot slot : slots) {
            if (requiresReducer(slot)) {
                List<Expression> arguments = Lists.create();
                arguments.add(f.newClassLiteral(importer.toType(slot.valueType)));
                arguments.add(Models.toLiteral(f, slot.basePath));
                arguments.add(f.newClassLiteral(importer.toType(slot.formatClass)));
                arguments.add(f.newClassLiteral(importer.toType(slot.namingClass)));
                arguments.add(f.newClassLiteral(importer.toType(slot.orderClass)));
                elements.add(new TypeBuilder(f, importer.toType(DirectOutputSpec.class))
                    .newObject(arguments)
                    .toExpression());
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.