@OpenApiAll
public class StereotypePropertyValueProvider
extends java.lang.Object
StereotypesHelper
class.
See StereotypesHelper.getStereotypePropertyValue(Element, Stereotype, String, boolean)
for
details.
Clients (plugins most likely) can register their own PropertyValueCalculator instances.
There is only one PropertyValueCalculator instance allowed for one stereotype and
stereotype property pair.Modifier and Type | Class and Description |
---|---|
static interface |
StereotypePropertyValueProvider.PropertyValueCalculator
Interface to provide a way for plugins to override tagged values visualization.
|
Constructor and Description |
---|
StereotypePropertyValueProvider() |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
canCalculateValue(Slot slot)
Indicates if stereotype property value can be calculated.
|
(package private) static java.util.List |
getCalculatedValue(Element element,
Slot slot)
Returns calculated property value if there is matching PropertyValueCalculator
available.
|
static void |
register(java.lang.String stereotypeName,
java.lang.String propertyName,
StereotypePropertyValueProvider.PropertyValueCalculator calc)
Registers the calc to particular particular stereotype and stereotype property.
|
static void |
unregister(java.lang.String stereotypeName,
java.lang.String propertyName)
Unregisters existing PropertyValueCalculator instance if there
was previously registered to particular stereotype and stereotype property
|
public static void unregister(java.lang.String stereotypeName, java.lang.String propertyName)
stereotypeName
- name of the stereotype, can not be nullpropertyName
- name of the stereotype property, can not be nullpublic static void register(java.lang.String stereotypeName, java.lang.String propertyName, StereotypePropertyValueProvider.PropertyValueCalculator calc)
stereotypeName
- name of the stereotype, can not be nullpropertyName
- name of the stereotype property, can not be nullcalc
- PropertyValueCalculator instance, can not be nullstatic java.util.List getCalculatedValue(Element element, Slot slot)
element
- parent model elementslot
- property valuestatic boolean canCalculateValue(Slot slot)
slot
- property value