There's already no need to use Iteration.over() anymore. It's implicit if the operation passed in is an AbstractIterationOperation. We improved this a few months ago :)

For example: https://github.com/windup/windup/blob/master/rules-java/src/main/java/org/jboss/windup/rules/apps/java/scan/provider/IndexClassFilesRuleProvider.java#L47


public Configuration getConfiguration(GraphContext context)
{
return ConfigurationBuilder.begin()
.addRule()
.when(Query.fromType(FileModel.class)
.withProperty(FileModel.IS_DIRECTORY, false)
.withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ".*\\.class")
)
.perform(
new AddClassFileMetadata()
.and(Commit.every(10))
.and(IterationProgress.monitoring("Indexed class file: ", 1000))
);
}

On Tue, Jan 27, 2015 at 8:18 PM, Ondrej Zizka <ozizka@redhat.com> wrote:
Hi all,

could this

         .addRule()
         .when(Query.fromType(ArchiveModel.class))
         .perform(Iteration.over(ArchiveModel.class)
             .perform(new AbstractIterationOperation<ArchiveModel>()
                 {
                     @Override
                     public void perform(GraphRewrite event,
EvaluationContext evCtx, ArchiveModel arch)
                     {

be just

         .addRule()
         .perform(new IterationOver(ArchiveModel.class) {
                     @Override
                     public void perform(GraphRewrite event,
EvaluationContext evCtx, ArchiveModel arch)
                     {

?
If it can ( a. principially, b. nobody objects), I could try coding it.


Thanks,
Ondra
_______________________________________________
windup-dev mailing list
windup-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev



--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."