Examples of newArrayInitializer()


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

                        // 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()
                }).toExpression();
            addAttribute(attribute);
        }
View Full Code Here

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

        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();
    }

    @Override
    public List<Annotation> getMemberAnnotations(
View Full Code Here

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

                        "shuffle", shuffle) //$NON-NLS-1$
                .toAnnotations());
        }
        return new AttributeBuilder(f)
            .annotation(context.resolve(Joined.class),
                    "terms", f.newArrayInitializer(eTerms)) //$NON-NLS-1$
            .toAnnotations();
    }

    private ArrayInitializer toMappings(EmitContext context, List<MappingFactor> mappings) {
        assert context != null;
View Full Code Here

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

                .annotation(context.resolve(Joined.Mapping.class),
                        "source", Models.toLiteral(f, source), //$NON-NLS-1$
                        "destination", Models.toLiteral(f, target)) //$NON-NLS-1$
                .toAnnotations());
        }
        return f.newArrayInitializer(eachMapping);
    }

    private Annotation toKey(EmitContext context, ReduceTerm<?> term) {
        assert context != null;
        assert term != null;
View Full Code Here

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

            PropertyDeclaration decl = origin.findDeclaration();
            properties.add(Models.toLiteral(f, context.getFieldName(decl).getToken()));
        }
        return new AttributeBuilder(f)
            .annotation(context.resolve(Key.class),
                    "group", f.newArrayInitializer(properties)) //$NON-NLS-1$
            .toAnnotations()
            .get(0);
    }
}
View Full Code Here

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

        for (PropertyDeclaration prop : model.getDeclaredProperties()) {
            names.add(Models.toLiteral(f, prop.getName().identifier));
        }
        return new AttributeBuilder(f)
            .annotation(context.resolve(PropertyOrder.class),
                    f.newArrayInitializer(names))
            .toAnnotations();
    }
}
View Full Code Here

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

                        "aggregator", aggregator, //$NON-NLS-1$
                        "source", Models.toLiteral(f, source), //$NON-NLS-1$
                        "destination", Models.toLiteral(f, target)) //$NON-NLS-1$
                .toAnnotations());
        }
        return f.newArrayInitializer(eachFolding);
    }

    private Summarized.Aggregator convert(PropertyMappingKind kind) {
        assert kind != null;
        switch (kind) {
View Full Code Here

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

            PropertyDeclaration decl = origin.findDeclaration();
            properties.add(Models.toLiteral(f, context.getFieldName(decl).getToken()));
        }
        return new AttributeBuilder(f)
            .annotation(context.resolve(Key.class),
                    "group", f.newArrayInitializer(properties)) //$NON-NLS-1$
            .toAnnotations()
            .get(0);
    }
}
View Full Code Here

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

                className,
                importer.toType(baseClass),
                importer,
                Collections.singletonList(f.newArrayCreationExpression(
                        (ArrayType) importer.toType(DirectOutputSpec[].class),
                        f.newArrayInitializer(elements))));
    }

    private Expression classLiteralOrNull(ModelFactory f, ImportBuilder importer, Name nameOrNull) {
        assert f != null;
        assert importer != null;
View Full Code Here

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

        for (PropertyDeclaration property : model.getDeclaredProperties()) {
            columns.add(Models.toLiteral(f, OriginalNameEmitter.getOriginalName(property)));
        }
        return new AttributeBuilder(f)
            .annotation(context.resolve(ColumnOrder.class),
                    "value", f.newArrayInitializer(columns))
            .toAnnotations();
    }
}
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.