|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ocl.examples.common.label.LabelGeneratorRegistry
public class LabelGeneratorRegistry
DebugString supports generation of debug identification of objects, determining a name usuing
the following alternatives.
MethodCall registrations may be made via registerInstanceMethod or registerStaticMethod.
A debug string may be obtained via DebugString.toDebug(object).
DebugString providers string formatters for simple classes such as String, Number, Boolean
and Ecore components such as EObject, Resource and ResourceSet.
User extensions should be registered prior to use. Beware that late registration can
give misleading results since in the absence of an exact MethodCall registration the
class hierarchy is search first for base classes then for instances for which there
is an exact MethodCall match. This result is then cached and so may occlude a late
registration.
The null object is identified as
Implementers of IDebugString are identified by IDebugString.toDebugString();
MethodCall registrations in DebugUtils are identified by MethodCall.invoke().
Other objects are identified as
Nested Class Summary
static class
LabelGeneratorRegistry.Global
Field Summary
protected ILabelGenerator.Registry
delegate
Fields inherited from interface org.eclipse.ocl.examples.common.label.ILabelGenerator.Registry
INSTANCE
Constructor Summary
LabelGeneratorRegistry(ILabelGenerator.Registry delegate)
Construct a registry that resolves label generators locally when possible
but which delegates to delegate otherwise.
Method Summary
<T> void
buildLabelFor(ILabelGenerator.Builder s,
T labelledObject)
<T> void
buildSubLabelFor(ILabelGenerator.Builder labelBuilder,
T labelledObject)
ILabelGenerator.Builder
createDefaultLabelBuilder(java.lang.Object labelledObject,
java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
static java.lang.String
debugLabelFor(java.lang.Object object)
ILabelGenerator<?>
get(java.lang.Class<?> labelledClass)
protected ILabelGenerator<?>
getLabelGenerator(java.lang.Class<?> cls)
static LabelGeneratorRegistry
init()
static void
initialize(ILabelGenerator.Registry registry)
java.lang.Object
install(java.lang.Class<?> labelledClass,
ILabelGenerator.Descriptor labelDescriptor)
java.lang.Object
install(java.lang.Class<?> labelledClass,
ILabelGenerator<?> labelGenerator)
java.lang.String
labelFor(java.lang.Object labelledObject)
java.lang.String
labelFor(java.lang.Object labelledObject,
java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
void
uninstall(java.lang.Class<?> labelledClass)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
delegate
@Nullable
protected final ILabelGenerator.Registry delegate
Constructor Detail
LabelGeneratorRegistry
public LabelGeneratorRegistry(@Nullable
ILabelGenerator.Registry delegate)
Method Detail
debugLabelFor
@NonNull
public static java.lang.String debugLabelFor(@NonNull
java.lang.Object object)
init
@NonNull
public static LabelGeneratorRegistry init()
initialize
public static void initialize(@NonNull
ILabelGenerator.Registry registry)
buildLabelFor
public <T> void buildLabelFor(@NonNull
ILabelGenerator.Builder s,
@Nullable
T labelledObject)
buildLabelFor
in interface ILabelGenerator.Registry
buildSubLabelFor
public <T> void buildSubLabelFor(@NonNull
ILabelGenerator.Builder labelBuilder,
@Nullable
T labelledObject)
buildSubLabelFor
in interface ILabelGenerator.Registry
createDefaultLabelBuilder
@NonNull
public ILabelGenerator.Builder createDefaultLabelBuilder(@Nullable
java.lang.Object labelledObject,
@Nullable
java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
get
@Nullable
public ILabelGenerator<?> get(@NonNull
java.lang.Class<?> labelledClass)
get
in interface ILabelGenerator.Registry
getLabelGenerator
@Nullable
protected ILabelGenerator<?> getLabelGenerator(@NonNull
java.lang.Class<?> cls)
install
@Nullable
public java.lang.Object install(@NonNull
java.lang.Class<?> labelledClass,
@NonNull
ILabelGenerator.Descriptor labelDescriptor)
install
in interface ILabelGenerator.Registry
install
@Nullable
public java.lang.Object install(@NonNull
java.lang.Class<?> labelledClass,
@NonNull
ILabelGenerator<?> labelGenerator)
install
in interface ILabelGenerator.Registry
labelFor
@NonNull
public java.lang.String labelFor(@Nullable
java.lang.Object labelledObject)
labelFor
in interface ILabelGenerator.Registry
labelFor
@NonNull
public java.lang.String labelFor(@Nullable
java.lang.Object labelledObject,
@Nullable
java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
labelFor
in interface ILabelGenerator.Registry
uninstall
public void uninstall(@NonNull
java.lang.Class<?> labelledClass)
uninstall
in interface ILabelGenerator.Registry
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD