Interface ILabelGenerator<T>

All Known Implementing Classes:
AbstractLabelGenerator, CommentLabelGenerator, DynamicEObjectImplLabelGenerator, EAnnotationLabelGenerator, EcoreURILabelGenerator, EGenericTypeLabelGenerator, ElementIdLabelGenerator, ENamedElementLabelGenerator, EObjectLabelGenerator, LiteralBooleanLabelGenerator, LiteralIntegerLabelGenerator, LiteralNullLabelGenerator, LiteralRealLabelGenerator, LiteralStringLabelGenerator, LiteralUnlimitedNaturalLabelGenerator, NameableLabelGenerator, NamedElementCSLabelGenerator, NamedElementLabelGenerator, OpaqueExpressionLabelGenerator, PackageImportLabelGenerator, RootLabelGenerator, SlotLabelGenerator, StringLabelGenerator, UMLElementExtensionLabelGenerator

public interface ILabelGenerator<T>

ILabelGenerator provides an extensible capability to derive a customized text string for an object. This is typically used to provide debug or UI descriptions of objects.

Extensibility is provided by registering new label generators with the registry to support additional classes. These may be registered automatically through use of the org.eclipse.ocl.examples.common.label_generator extension point.

Minor customization can be achieved by using a modified Builder to build the label. The builder can be parameterised by options.

Full customization can be achieved by using an alternate Registry with completely different label generators..

Nested Class Summary
static interface ILabelGenerator.Builder
          An ILabelGenerator.Builder (typically realised by a StringBuilder) builds the generated label.
static interface ILabelGenerator.Descriptor
          An ILabelGenerator.Descriptor may be used by the ILabelGenerator.Registry to defer loading of the labelled class until an instance needs a label.
static interface ILabelGenerator.Option<T>
          An ILabelGenerator.Builder may have options with an associated typed value.
static interface ILabelGenerator.Registry
          An ILabelGenerator.Registry maintains a mapping from the class name to be labelled and the label generator that can build its label.
static interface ILabelGenerator.Self
          Self defines the interface of an object able to label itself.
Method Summary
 void buildLabelFor(ILabelGenerator.Builder labelBuilder, T labelledObject)

Method Detail


void buildLabelFor(@NonNull
                   ILabelGenerator.Builder labelBuilder,
                   T labelledObject)