If you are allowed to, you could always factor out the dependency into a
third class that handles the relationship between the two classes. Cross
class dependencies generally (but do not always) indicate that some
refactoring needs to be done.

> -----Original Message-----
> From: D Gross [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 26, 2001 10:59 AM
> To: [EMAIL PROTECTED]
> Subject: dependencies
> 
> 
> I'm new to ANT and old to make.  I would like to understand how to add
> dependency rules to ant to handle the simple case of cross 
> class dependencies.
>  I've read posts regarding <taskdef name="depend"...> and the 
> depend="true"
> in the <javac> task, but either I'm not understanding it or it doesn't
> work.  (At least I know the former is true)
> 
> Here's the example:
> Class A has method foo() in A.java
> Class B calls A.foo() in B.java
> A.foo() is changed to take, say an int: foo(int x)
> 
> When rebuilding with ANT, A.java will get recompiled, but not B.java.
> 
> I've looked at jikes which will spit out the dependency 
> information that
> would solve this problem, if I could just get the information into ANT
> so that it passes both A.java and B.java to javac.
> 
> Thanks,
> -- Dave Gross
> 
> 
> __________________________________________________
> FREE voicemail, email, and fax...all in one place.
> Sign Up Now! http://www.onebox.com
> 

Reply via email to