On May 23, 2005, at 9:06 PM, Mike Kienenberger wrote:
>> Simply importing something, even if its not used, still requires the
>> dependency be available at run-time.
>>
>
> I'm no expert on this, so all I can point to is the emperical
> behavior:
> Neither importing nor declaring an instance variable introduces a
> run-time
> dependency. Having unexecuted code that references the instance
> variable
> also doesn't introduce the dependency.
>
>
> Doing something like this:
>
> if (false ==
> ClassGenerator.VERSION_1_1.equals(generator.getVersionString()))
> {
> initializeVppConfig();
> generator.setVppConfig(vppConfig);
> }
>
> also does not introduce a run-time dependency, at least not for Sun
> Java
> 1.4.2.
I'm having a hard time believing that you can import VPPConfig into
your task, don't have VPP's JAR on the classpath, and the class still
loads. But maybe I'm losing my Java touch with all the Ruby coding
I'm doing lately :)
No where above do you have anything explicitly referencing VPP's
classes - it is all generic method calls with vppConfig potentially
being an Object :) But I do trust you're having an issue with it and
that you're correct.
> Doing the following works, but I suspect it breaks Ant.
>
> public void addConfiguredConfig(Object vppConfig) {
> this.vppConfig = (VPPConfig)vppConfig;
> }
Yeah, Ant looks at the method signature to determine what type of
object to construct. Object won't be sufficient.
Erik
This archive was generated by hypermail 2.0.0 : Mon May 23 2005 - 21:12:52 EDT