From: > On Thu, 28 Feb 2002, Magesh Umasankar wrote: > > > > Not if you first declare "striplinecomments" as a type, using > > > a typedef declaration ( or antlib ). > > > > > > > How will I be able to extend from java.ioFilterReader > > as well as DataType at the same time? > > You don't have to - again, TaskAdapter ( or RoleAdapter in > proposal ) will do the magic. ( well, you > need a TypeAdapter equivalent with TaskAdapter ). > I'm working on a generic solution based on RoleAdapter > and TaskFactory, but even if this is not accepted, > RoleAdapter in antlib or a trivial cut&paste from > TaskAdapter will solve this - not only for FilterReader > but for anything else. > > Plugging a bean into ant shouldn't require > extending DataType or Task - just by implementing the > ant patterns and letting ant do the adaptation. > Once makes its way in, will become extinct, ok? > > > Also, note one of my aims was to be able to write > > a pluggable filterreader that has been created > > without making use of any of Ant's APIs... I don't > > know how _important_ it is for this rule to > > stay, but if it stays, it will be more convenient... > > Yes, this is very _important_ for me too. > cool :-) > > > > The class would have to follow ant's patterns - i.e. have > > > addComment(), etc - like a task ( or a TaskAdapter-ed task ) > > > would. > > > > It already does so that it can be used > > in short form notation too. That is, > > > > ... > > > > can also be written as > > > > ... > > > > Why do you need the first form ? It's ugly, doesn't follow the > ant patterns, etc. We don't have . > The first form is not needed currently. FilterChain recognizes elements added using . However, not all filterreaders that are created by users will be recognized by FilterChain. For such filterreaders, user would use (or when available) syntax. The first form is just an _example_ to illustrate that striplinecomments, though it has a convenient form, is a generic filterreader just like the user's. The first form does follow ant patterns - checkout . > The real problem is that you don't have enough power in > and TypeAdapter - but it's better to solve the > real problem instead of doing a workaround. As I said, I am not opposing getting this solved in a generic way. The element inside is being used just to get around Ant's current limitations, just like , etc. > > > There are enough proposals already ;-) > > I will just wait till something surfaces > > and I will use it. Till then, look at > > as another motivation > > for ;-) > > I would reverse it - look at my comments on filterreader > as a motivation for you to get involved in > or just the adapter part. Are you against the proposal being put into the main trunk _before_ gets there? > > Costin > Cheers, Magesh ************************************************* * Committee: Individuals who can do nothing * * individually and sit to decide that nothing * * can be done together. * ************************************************* -- To unsubscribe, e-mail: For additional commands, e-mail: