org.eclipse.ocl.examples.common.label
Interface ILabelGenerator.Builder

All Known Implementing Classes:
AbstractLabelGeneratorBuilder, DefaultLabelGeneratorBuilder
Enclosing interface:
ILabelGenerator<T>

public static interface ILabelGenerator.Builder

An ILabelGenerator.Builder (typically realised by a StringBuilder) builds the generated label. The formatting may have options.


Field Summary
static ILabelGenerator.Option<java.lang.Boolean> SHOW_CLASS_NAME
          If the SHOW_CLASS_NAME option is present and true, the value of object.getClass().getName() is prefixed to the formatted description of each object.
static ILabelGenerator.Option<java.lang.Boolean> SHOW_CLASS_SIMPLE_NAME
          If the SHOW_CLASS_SIMPLE_NAME option is present and true, the value of object.getClass().getSimpleName() is prefixed to the formatted description of each object.
 
Method Summary
 void appendObject(java.lang.Object object)
          Append the generated label of an object to the overall generated label.
 void appendString(java.lang.String string)
           
 void buildLabelFor(java.lang.Object labelledObject)
           
<T> T
getOption(ILabelGenerator.Option<T> option)
           
 ILabelGenerator.Registry getRegistry()
           
<T> void
setOption(ILabelGenerator.Option<T> option, T value)
           
 

Field Detail

SHOW_CLASS_NAME

static final ILabelGenerator.Option<java.lang.Boolean> SHOW_CLASS_NAME
If the SHOW_CLASS_NAME option is present and true, the value of object.getClass().getName() is prefixed to the formatted description of each object.


SHOW_CLASS_SIMPLE_NAME

static final ILabelGenerator.Option<java.lang.Boolean> SHOW_CLASS_SIMPLE_NAME
If the SHOW_CLASS_SIMPLE_NAME option is present and true, the value of object.getClass().getSimpleName() is prefixed to the formatted description of each object.

Method Detail

appendObject

void appendObject(java.lang.Object object)
Append the generated label of an object to the overall generated label.

Parameters:
object - to be appended.

appendString

void appendString(java.lang.String string)

buildLabelFor

void buildLabelFor(java.lang.Object labelledObject)

getOption

<T> T getOption(ILabelGenerator.Option<T> option)

getRegistry

ILabelGenerator.Registry getRegistry()

setOption

<T> void setOption(ILabelGenerator.Option<T> option,
                   T value)