ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: addXXX related question
Date Sun, 03 Mar 2002 09:10:29 GMT
On Sun, 3 Mar 2002 20:02, Magesh Umasankar wrote:
> The problem seems to be in IntrospectionHelper/
> ProjectHelper.  If the method name begins with
> "add", IntrospectionHelper requires to be able to
> create an instance of the argument, whether
> it is used as an element in the build file or not.
> If it does not find the class, it throws a
> NoClassDefFoundError.

It is a feature of classloading. When you define the FilterChain class you 
need to able to define all classes it uses - when you use reflection you 
force the class to be fully defined. Thus it will try to load BCEL anytime 
you perform reflection on FilterChain.

A way around this would to provide an interface+wrapper type system. Take a 
look at how the mappers or regex objects behave to see what I mean.


-- 
Cheers,

Pete

----------------------------------------
Whatever you do will be insignificant, 
but it is very important that you do it. 
                              --Gandhi
----------------------------------------

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message