Okay, using custom PropertyEvaluators (e.g. the "types" evaluator from the props antlib) we can set an attribute of a task or type to an arbitrary Ant type. I would like to (after 1.8.0, I suppose) add a resource implementation that simply allows one to say, e.g.:

<parsedresource parse="${file(foo.txt)}" /><!-- the file(foo.txt) piece is implemented by the aforementioned "types" evaluator -->

Now, programmatically, this type is ridiculously trivial:

public class ParsedResource extends ResourceDecorator {

  public void setParse(Resource r) {
    addConfigured(r);
  }

}

From a code perspective, this can be interpreted as simply implementing a means of specifying the decorated resource as a bean property, as an alternative to calling a method. And the "parsed" mechanism only comes into play if the user consciously chooses to configure Ant's PropertyHelper appropriately. So I'm searching for a better name for this concept. The motivation here is, in particular, to have a way to specify arbitrary resources via user properties when a given task (e.g. import) allows only nested resources and therefore won't take advantage of IntrospectionHelper's new Object-parsing mechanism, which applies only to attributes.

Another naming idea that occurs to me is <injectedresource resource="..." /> Does anybody have anything better?


Finally, I'd be delighted if, once a nomenclature is settled upon, if the community said "hey, this is both trivial from a risk perspective yet potentially quite useful--let's include it in 1.8.0!", but I certainly won't insist upon it. ;)

Thanks for listening,
Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to