3

Possible Duplicate:
Examples of GoF Design Patterns

Is there a Java API class which follows the factory design pattern?

Community
  • 1
  • 1
Vikram P
  • 85
  • 2
  • 11
  • see [BalusC's answer to the above question](http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns/2707195#2707195). Pure beauty! – Sean Patrick Floyd Aug 24 '11 at 07:58

4 Answers4

3

class.newInstance();

Integer.valueOf()

jmj
  • 237,923
  • 42
  • 401
  • 438
1

Go to the online javadocs.

Use your web browser's page search to search for "Factory". (It's Control-F and Control-G on most of them.)

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
0

BorderFactory for example.

dacwe
  • 43,066
  • 12
  • 116
  • 140
0

You can have a look at SAXParserFactory. It is a factory class which can be used to intantiate SAX based parsers to pares XML. The method newInstance is the factory method which instantiates the sax parsers based on some predefined logic.

Swagatika
  • 3,376
  • 6
  • 30
  • 39