Gidday Diane,

Definitely not goofy, but given there are 476 different
ways to skin your knees you could also do something like 
Solution #477 -- it kinda keeps the responsibility of
scanDir() small and simple.


protected void scanDir(..)
{
  :
  File classFile = new File(buildClassFilename(files[i]));
  :
}

private String buildClassFilename(String srcFilename)
{
  String basename = srcFilename.substring(0, srcFilename.indexOf(".java") +
                    ".class";

  if (true == flatten)
    return basename;
  else
    return destDir.getAbsolutePath() + basename;
}


Robbe Stewart      Software Engineer
Altasys Software         Cell +61 414 643 461
                   Ph +61 8 8259 7430

Contracted to:          
Department of Defence   mailto:[EMAIL PROTECTED]
Salisbury SA
Australia

Reply via email to