-
Story
-
Resolution: Done
-
Major
-
2.0.0.Alpha1
-
None
-
None
-
None
Currently, the iteration looks like:
.addRule()
.when(JavaClass.references("org.jboss.forge.furnace.*").at(TypeReferenceLocation.IMPORT))
.perform(Iteration.over()
.perform(Classification.classifyAs("Furnace Service")
.with(Link.to("JBoss Forge", "http://forge.jboss.org")).withEffort(0)
.and(Hint.havingText("Furnace type references imply that the client code must be run within a Furnace container.")
.withEffort(8)
.and(addTypeRefToList))
).endIteration()
);
I suggest:
.addRule() .forEach( JavaClass.references("org.jboss.forge.furnace.*").at(TypeReferenceLocation.IMPORT) ) .perform( Classification.classifyAs("Furnace Service") .with(...), Hint.in("#{ref.file}").at("ref").withText(...), Hint.havingText(...).withEffort(8) )
But something tells me this might need OCPrewrite API change.
.addRule()
.perform(
For.each( JavaClass.references("org.jboss.forge.furnace.*").at(TypeReferenceLocation.IMPORT) ).perform(
Classification.classifyAs("Furnace Service") .with(...),
Hint.in("#{ref.file}").at("ref").withText(...),
Hint.havingText(...).withEffort(8)
)
)