This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 40969 - Turn few things into factory methods
Summary: Turn few things into factory methods
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
Depends on:
Blocks: 40703
  Show dependency tree
Reported: 2004-03-12 17:21 UTC by Jaroslav Tulach
Modified: 2005-12-14 16:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2004-03-12 17:21:09 UTC
We have suggested to turn SimpleAntArtifact and
GlobFileBuiltQuery into factory methods. This is

Jesse's reply was that he will need to find or
create some class to put them into.

My advice is AntArtifact.create(...) for
SimpleAntArtifact and create AntSupport or Ants
;-) class in the package and
merge all the lonely static methods there:
- GlobFileBuiltQuery factory
- ProjectGenerator
- PropertyUtils
- maybe put SimpleAntArtifact there as well

I know Jesse's opinion about
org.openide.util.Utilities, that join a lot of
unrelated things together, but I think that these
methods are not that unrelated. They have the same
topic - support for work with ant and ant based
project, so I would move them into one class, as
the current clutter is big - I see for classes and
they in fact mean only four methods!
Comment 1 Jesse Glick 2004-03-12 17:54:18 UTC
Accept suggestion to use factory methods.

Reject suggestion of AntArtifact.create as that would create an
unwanted dep from the generic API package to the particular SPI
support package.

Reject suggestion to merge ProjectGenerator and PropertyUtils with
anything else; these are logically quite separate things and I don't
want them mixed. They may also be expanded in the future to include
additional public methods.

Might make factory methods for GlobFileBuiltQuery and
SimpleAntArtifact into nonstatic methods in AntProjectHelper.
Comment 2 Jesse Glick 2004-04-03 03:21:10 UTC
Comment 3 Marian Mirilovic 2005-12-14 16:33:31 UTC
without additional comments for long time - closing