Effective Java

Effective Java #1: Static Factory Methods

I’ve added a new page in the Joshua Block Tribute section of my blog:

Static Factory Methods


This famous “I Love Lucy” episode depicts what you might experience if you make creating objects into a crazy mess. (image credit: Desilu Productions/Paramount, source: cornerstone-ct.com)

Using static factory methods can help keep the creation of objects from turning into an assembly line of hilarity.  That means:

  1. less code needed to use your masterpiece API,
  2. an easier time figuring out how to get your API to create the right objects.

And now it's your turn ... comment here or on Twitter (@Androider)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s