net.sf.mmm.util.text.base
Class JustificationBuilderImpl

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
      extended by net.sf.mmm.util.component.base.AbstractLoggableComponent
          extended by net.sf.mmm.util.text.base.JustificationBuilderImpl
All Implemented Interfaces:
JustificationBuilder

@Singleton
@Named
public class JustificationBuilderImpl
extends AbstractLoggableComponent
implements JustificationBuilder

This is the implementation of the JustificationBuilder.

Since:
1.1.1
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private static JustificationBuilder instance
           
 
Constructor Summary
JustificationBuilderImpl()
          The constructor.
 
Method Summary
 Justification build(String format)
          This method parses the given format as Justification.
static JustificationBuilder getInstance()
          This method gets the singleton instance of this JustificationBuilder.
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent
doInitialize, getLogger, setLogger
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent
doInitialized, getInitializationState, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static JustificationBuilder instance
See Also:
getInstance()
Constructor Detail

JustificationBuilderImpl

public JustificationBuilderImpl()
The constructor.

Method Detail

getInstance

public static JustificationBuilder getInstance()
This method gets the singleton instance of this JustificationBuilder.
This design is the best compromise between easy access (via this indirection you have direct, static access to all offered functionality) and IoC-style design which allows extension and customization.
For IoC usage, simply ignore all static getInstance() methods and construct new instances via the container-framework of your choice (like plexus, pico, springframework, etc.). To wire up the dependent components everything is properly annotated using common-annotations (JSR-250). If your container does NOT support this, you should consider using a better one.

Returns:
the singleton instance.

build

public Justification build(String format)
This method parses the given format as Justification.

Specified by:
build in interface JustificationBuilder
Parameters:
format - is the format specified above.
Returns:
the parsed Justification


Copyright © 2001-2010 mmm-Team. All Rights Reserved.