|
||||||||||
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
Field Summary
protected ILabelGenerator.Registry
delegate
Fields inherited from interface org.eclipse.ocl.examples.common.label.ILabelGenerator.Registry
INSTANCE
Constructor Summary
LabelGeneratorRegistry()
Construct a registry that resolves label generators locally.
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.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
static java.lang.String
debugLabelFor(java.lang.Object object)
ILabelGenerator<?>
get(java.lang.Class<?> labelledClass)
ILabelGenerator<?>
get(java.lang.String labelledClass)
protected ILabelGenerator<?>
getLabelGenerator(java.lang.Class<?> cls)
static void
initialize(ILabelGenerator.Registry registry)
java.lang.Object
install(java.lang.Class<?> labelledClass,
ILabelGenerator<?> labelGenerator)
java.lang.Object
install(java.lang.String labelledClass,
ILabelGenerator.Descriptor labelDescriptor)
java.lang.Object
install(java.lang.String 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)
java.lang.Object
uninstall(java.lang.String labelledClass)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
delegate
protected final ILabelGenerator.Registry delegate
Constructor Detail
LabelGeneratorRegistry
public LabelGeneratorRegistry()
LabelGeneratorRegistry
public LabelGeneratorRegistry(ILabelGenerator.Registry delegate)
Method Detail
debugLabelFor
public static java.lang.String debugLabelFor(java.lang.Object object)
initialize
public static void initialize(ILabelGenerator.Registry registry)
buildLabelFor
public <T> void buildLabelFor(ILabelGenerator.Builder s,
T labelledObject)
buildLabelFor
in interface ILabelGenerator.Registry
buildSubLabelFor
public <T> void buildSubLabelFor(ILabelGenerator.Builder labelBuilder,
T labelledObject)
buildSubLabelFor
in interface ILabelGenerator.Registry
createDefaultLabelBuilder
public ILabelGenerator.Builder createDefaultLabelBuilder(java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
get
public ILabelGenerator<?> get(java.lang.String labelledClass)
get
in interface ILabelGenerator.Registry
get
public ILabelGenerator<?> get(java.lang.Class<?> labelledClass)
getLabelGenerator
protected ILabelGenerator<?> getLabelGenerator(java.lang.Class<?> cls)
install
public java.lang.Object install(java.lang.String labelledClass,
ILabelGenerator.Descriptor labelDescriptor)
install
in interface ILabelGenerator.Registry
install
public java.lang.Object install(java.lang.String labelledClass,
ILabelGenerator<?> labelGenerator)
install
in interface ILabelGenerator.Registry
install
public java.lang.Object install(java.lang.Class<?> labelledClass,
ILabelGenerator<?> labelGenerator)
install
in interface ILabelGenerator.Registry
labelFor
public java.lang.String labelFor(java.lang.Object labelledObject)
labelFor
in interface ILabelGenerator.Registry
labelFor
public java.lang.String labelFor(java.lang.Object labelledObject,
java.util.Map<ILabelGenerator.Option<?>,java.lang.Object> options)
labelFor
in interface ILabelGenerator.Registry
uninstall
public java.lang.Object uninstall(java.lang.String 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