The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Cyclic Dependency - Design Issue

Posted by N. Ganapathy Subramanian on January 08, 2001 at 10:53 PM

Hi Kishori,

Thanks for you reply.

Its basically not about compilation. Its about a design issue, where we want to avoid cyclic dependency.

There few things which I like to point out in your suggestion are

1) By taking more specific case of dependency (aggregate)
temp1 is contained (member) in temp2 &
temp2 is contained (member) in temp1 &

2) temp1 and temp2 are in different package

For the above casses the compilation would work only if both temp1 and temp2 are compiled togather (i.e. in the same command line - javac package(x).temp1 package(y).temp2)

Even doing the above it doesnt remove the dependency, but just a solution to compile two dependent class. But the real thing is to remove the dependency between temp1 and temp2l without using patterns in GOF.

Thanks & Regards
N. Ganapathy Subramanian.

  • Exceptions richard January 10, 2001 at 10:20 PM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us