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.
static ILabelGenerator.Option<java.lang.String> SHOW_QUALIFIER
          If the SHOW_QUALIFIER option is present its value is used as a separator between a container name and a child name.
 
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)
           
 java.lang.Object getLabelledObject()
           
<T> T
getOption(ILabelGenerator.Option<T> option)
           
 ILabelGenerator.Registry getRegistry()
           
<T> boolean
hasOption(ILabelGenerator.Option<T> option)
           
<T> void
setOption(ILabelGenerator.Option<T> option, T value)
           
 java.lang.String toString()
           
 

Field Detail

SHOW_CLASS_NAME

@NonNull
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

@NonNull
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.


SHOW_QUALIFIER

@NonNull
static final ILabelGenerator.Option<java.lang.String> SHOW_QUALIFIER
If the SHOW_QUALIFIER option is present its value is used as a separator between a container name and a child name.

Method Detail

appendObject

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

Parameters:
object - to be appended.

appendString

void appendString(@Nullable
                  java.lang.String string)

buildLabelFor

void buildLabelFor(@Nullable
                   java.lang.Object labelledObject)

getLabelledObject

@Nullable
java.lang.Object getLabelledObject()

getOption

@Nullable
<T> T getOption(@NonNull
                         ILabelGenerator.Option<T> option)

hasOption

<T> boolean hasOption(@NonNull
                      ILabelGenerator.Option<T> option)

getRegistry

ILabelGenerator.Registry getRegistry()

setOption

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

toString

@NonNull
java.lang.String toString()
Overrides:
toString in class java.lang.Object