Package com.asakusafw.utils.java.model.syntax

Examples of com.asakusafw.utils.java.model.syntax.Annotation


        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$
                        "mappings", mappings, //$NON-NLS-1$
                        "shuffle", shuffle) //$NON-NLS-1$
View Full Code Here


        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$
                        "foldings", mappings, //$NON-NLS-1$
                        "shuffle", shuffle) //$NON-NLS-1$
View Full Code Here

            groupKeys.add(common.getFieldNameOf(
                    s.getName(),
                    s.getType()).getToken());
        }
        String[] group = groupKeys.toArray(new String[groupKeys.size()]);
        Annotation key = f.newNormalAnnotation(
                (NamedType) bless(Key.class),
                Collections.singletonList(f.newAnnotationElement(
                        f.newSimpleName("group"),
                        Models.toArrayInitializer(f, group))));
        return f.newNormalAnnotation(
View Full Code Here

        if (property.getJoined() != null) {
            elements.add(f.newAnnotationElement(
                    f.newSimpleName("join"),
                    createSourceAnnotation(property.getJoined())));
        }
        Annotation prop = f.newNormalAnnotation(
                (NamedType) bless(Property.class),
                elements);
        return Collections.singletonList(prop);
    }
View Full Code Here

            groupKeys.add(common.getFieldNameOf(
                    s.getName(),
                    s.getType()).getToken());
        }
        String[] group = groupKeys.toArray(new String[groupKeys.size()]);
        Annotation key = f.newNormalAnnotation(
                (NamedType) bless(Key.class),
                Collections.singletonList(f.newAnnotationElement(
                        f.newSimpleName("group"),
                        Models.toArrayInitializer(f, group))));
        return f.newNormalAnnotation(
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.model.syntax.Annotation

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.