org.eclipse.ocl.examples.common.label
Class AbstractLabelGeneratorBuilder

java.lang.Object
  extended by org.eclipse.ocl.examples.common.label.AbstractLabelGeneratorBuilder
All Implemented Interfaces:
ILabelGenerator.Builder
Direct Known Subclasses:
DefaultLabelGeneratorBuilder

public abstract class AbstractLabelGeneratorBuilder
extends java.lang.Object
implements ILabelGenerator.Builder

AbstractLabelGeneratorBuilder builds the formatted description on behalf of a ILabelGenerator.Builder.


Field Summary
protected  java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options
           
protected  ILabelGenerator.Registry registry
           
 
Fields inherited from interface org.eclipse.ocl.examples.common.label.ILabelGenerator.Builder
SHOW_CLASS_NAME, SHOW_CLASS_SIMPLE_NAME
 
Constructor Summary
protected AbstractLabelGeneratorBuilder(ILabelGenerator.Registry registry, java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
           
 
Method Summary
 void appendObject(java.lang.Object object)
          Append the generated label of an object to the overall generated label.
 void buildLabelFor(java.lang.Object object)
           
<T> T
getOption(ILabelGenerator.Option<T> option)
           
 ILabelGenerator.Registry getRegistry()
           
<T> void
setOption(ILabelGenerator.Option<T> option, T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.common.label.ILabelGenerator.Builder
appendString
 

Field Detail

registry

protected final ILabelGenerator.Registry registry

options

protected java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options
Constructor Detail

AbstractLabelGeneratorBuilder

protected AbstractLabelGeneratorBuilder(ILabelGenerator.Registry registry,
                                        java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
Method Detail

appendObject

public void appendObject(java.lang.Object object)
Description copied from interface: ILabelGenerator.Builder
Append the generated label of an object to the overall generated label.

Specified by:
appendObject in interface ILabelGenerator.Builder
Parameters:
object - to be appended.

buildLabelFor

public void buildLabelFor(java.lang.Object object)
Specified by:
buildLabelFor in interface ILabelGenerator.Builder

getOption

public <T> T getOption(ILabelGenerator.Option<T> option)
Specified by:
getOption in interface ILabelGenerator.Builder

getRegistry

public ILabelGenerator.Registry getRegistry()
Specified by:
getRegistry in interface ILabelGenerator.Builder

setOption

public <T> void setOption(ILabelGenerator.Option<T> option,
                          T value)
Specified by:
setOption in interface ILabelGenerator.Builder