@OpenApiAll
public class SmartListenerConfig
extends java.lang.Object
Smart listener configuration describes how to reach a specific property in the model from a given model element. Smart listener uses the configuration to create a chain of properties through which listener events map.
This class also contains predefined smart listener configurations which can be widely reused. Reusable smart listener configurations cannot be modified.
Modifier and Type | Field and Description |
---|---|
static SmartListenerConfig |
APPLIED_STEREOTYPE_AND_TAGGED_VALUE_SHALLOW_CONFIG
Listens to applied stereotypes and tagged values values.
|
static SmartListenerConfig |
APPLIED_STEREOTYPE_CONFIG
Listen to the applied stereotype.
|
static SmartListenerConfig |
APPLIED_STEREOTYPE_NAME_AND_TAGGED_VALUE_DEEP_CONFIG
Listens to applied stereotype's name, tagged values values and tag definition properties.
|
static SmartListenerConfig |
APPLIED_STEREOTYPE_NAME_CONFIG
Listen to the applied stereotype's name.
|
static SmartListenerConfig |
APPLIED_STEREOTYPE_NAME_ICON_AND_TAGGED_VALUE_DEEP_CONFIG
Listens to applied stereotype (name and icon), tagged values (value and names of values), tag definition's name.
|
static SmartListenerConfig |
APPLIED_STEREOTYPE_NAME_ICON_CONFIG
Listen to the applied stereotype's name and icon
|
static SmartListenerConfig |
COMBINED_FRAGMENT_CONFIG
Listens to combined fragment.
|
static SmartListenerConfig |
CONVEYED_INFORMATION_CONFIG
Listens to conveyed information.
|
static SmartListenerConfig |
DIAGRAM_CONTEXT_CONFIG
Listens to diagram context.
|
static SmartListenerConfig |
DOCUMENTATION_CONFIG
Listen to the documention of the element.
|
static SmartListenerConfig |
EMPTY_CONFIG
Configuration that does not listen to any properties
|
static SmartListenerConfig |
INSTANCE_SLOT_VALUE_CONFIG
Listen to properties of Slot of InstanceSpecification.
|
static SmartListenerConfig |
MESSAGE_CONFIG
Listens to the message.
|
static SmartListenerConfig |
MESSAGE_SIGNATURE_CONFIG
Listens to message signature.
|
static SmartListenerConfig |
MULTIPLICITY_CONFIG
Listens to the multiplicity.
|
static SmartListenerConfig |
NAME_CONFIG
Listen to the name of the element.
|
static SmartListenerConfig |
PARAMETER_SUBSTITUTION_CONFIG
Listens to parameter substitution.
|
static SmartListenerConfig |
QUALIFIED_NAME_CONFIG
Listen to the qualified name of the element.
|
static SmartListenerConfig |
SLOT_VALUE_CONFIG
Listen to the value of Slot.
|
static SmartListenerConfig |
STEREOTYPE_METACLASS_CONFIG
Listen to the metaclass of Stereotype.
|
static SmartListenerConfig |
TAGGED_VALUE_DEEP_CONFIG
Listens to applied tagged values properties.
|
static SmartListenerConfig |
TAGGED_VALUE_SHALLOW_CONFIG
Listens to applied tagged values values.
|
static SmartListenerConfig |
TRANSITION_CONFIG
Listens to transition.
|
static SmartListenerConfig |
TRIGGER_CONFIG
Listens to trigger.
|
static SmartListenerConfig |
VALUE_OF_TAGGED_VALUE_CONFIG
Listen to the properties of values of TaggedValue.
|
static SmartListenerConfig |
VALUE_SPECIFICATION_CONFIG
Listen to properties of ValueSpecification.
|
Constructor and Description |
---|
SmartListenerConfig()
Constructs empty configuration.
|
SmartListenerConfig(java.util.Map<java.lang.String,SmartListenerConfig> references)
Constructs the configuration.
|
SmartListenerConfig(java.lang.String propertyName)
Constructs the configuration with a property name.
|
SmartListenerConfig(java.lang.String propertyName,
SmartListenerConfig config)
Constructs the configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(SmartListenerConfig config)
Makes a shallow copy of the passed config to this config.
|
SmartListenerConfig |
deepCopy()
Creates a deep copy of the specified smart listener config.
|
void |
deepCopy(SmartListenerConfig config)
Deep copies a passed config to this config.
|
void |
dump()
Dumps property configuration to the standard output.
|
SmartListenerConfig |
getPropertyConfig(java.lang.String propertyName)
Gets property config which is used for a particular property.
|
java.util.Map<java.lang.String,SmartListenerConfig> |
getReferences()
Gets references of this configuration.
|
static void |
initValueSpecificationConfig(SmartListenerConfig valueSpecificationConfig,
SmartListenerConfig elementAsValueConfig)
Initializes value specification config.
|
SmartListenerConfig |
listenTo(java.util.Collection<java.lang.String> propertyNames)
Listens to given properties' names.
|
SmartListenerConfig |
listenTo(SmartListenerConfig config)
Merges information from given config.
|
SmartListenerConfig |
listenTo(java.lang.String... propertyNames)
Listens to given properties' names.
|
SmartListenerConfig |
listenTo(java.lang.String propertyName)
Listens to a given property name.
|
SmartListenerConfig |
listenTo(java.lang.String referenceName,
SmartListenerConfig config)
Listens to a given property and passes a smart listener configuration for it to
apply if references are found among property values.
|
SmartListenerConfig |
listenTo2(java.lang.String referenceName,
SmartListenerConfig config)
Deprecated.
use
listenTo(String, SmartListenerConfig) , because it merges configs too. |
SmartListenerConfig |
listenToNested(java.lang.String propertyName)
Listens to a nested property configuration.
|
void |
makeUnmodifiable()
Make config unmodifiable.
|
static SmartListenerConfig |
mergeConfigurations(java.util.Collection<SmartListenerConfig> configurations)
Merges given configurations into a single configuration.
|
static SmartListenerConfig |
mergeConfigurations(SmartListenerConfig c1,
SmartListenerConfig c2)
Merges two configurations into a single configuration.
|
public static final SmartListenerConfig NAME_CONFIG
public static final SmartListenerConfig DOCUMENTATION_CONFIG
public static final SmartListenerConfig QUALIFIED_NAME_CONFIG
public static final SmartListenerConfig VALUE_SPECIFICATION_CONFIG
public static final SmartListenerConfig SLOT_VALUE_CONFIG
public static final SmartListenerConfig INSTANCE_SLOT_VALUE_CONFIG
public static final SmartListenerConfig STEREOTYPE_METACLASS_CONFIG
public static final SmartListenerConfig APPLIED_STEREOTYPE_CONFIG
public static final SmartListenerConfig APPLIED_STEREOTYPE_AND_TAGGED_VALUE_SHALLOW_CONFIG
public static final SmartListenerConfig APPLIED_STEREOTYPE_NAME_CONFIG
public static final SmartListenerConfig APPLIED_STEREOTYPE_NAME_ICON_CONFIG
public static final SmartListenerConfig APPLIED_STEREOTYPE_NAME_AND_TAGGED_VALUE_DEEP_CONFIG
public static final SmartListenerConfig APPLIED_STEREOTYPE_NAME_ICON_AND_TAGGED_VALUE_DEEP_CONFIG
public static final SmartListenerConfig TAGGED_VALUE_SHALLOW_CONFIG
public static final SmartListenerConfig TAGGED_VALUE_DEEP_CONFIG
public static final SmartListenerConfig VALUE_OF_TAGGED_VALUE_CONFIG
public static final SmartListenerConfig PARAMETER_SUBSTITUTION_CONFIG
public static final SmartListenerConfig TRIGGER_CONFIG
public static final SmartListenerConfig TRANSITION_CONFIG
public static final SmartListenerConfig MESSAGE_SIGNATURE_CONFIG
public static final SmartListenerConfig MESSAGE_CONFIG
public static final SmartListenerConfig COMBINED_FRAGMENT_CONFIG
public static final SmartListenerConfig CONVEYED_INFORMATION_CONFIG
public static final SmartListenerConfig DIAGRAM_CONTEXT_CONFIG
public static final SmartListenerConfig MULTIPLICITY_CONFIG
public static final SmartListenerConfig EMPTY_CONFIG
public SmartListenerConfig()
public SmartListenerConfig(java.lang.String propertyName)
propertyName
- property name to use as a referencelistenTo(String)
public SmartListenerConfig(java.lang.String propertyName, SmartListenerConfig config)
propertyName
- property name to use as a referenceconfig
- config to use with a property referencelistenTo(String, SmartListenerConfig)
public SmartListenerConfig(java.util.Map<java.lang.String,SmartListenerConfig> references)
references
- map of references to usepublic static void initValueSpecificationConfig(SmartListenerConfig valueSpecificationConfig, SmartListenerConfig elementAsValueConfig)
valueSpecificationConfig
- config to initialize.elementAsValueConfig
- element config to use.public void makeUnmodifiable()
public void copy(SmartListenerConfig config)
config
- passed configuration for copying.public void deepCopy(SmartListenerConfig config)
config
- config to copypublic SmartListenerConfig deepCopy()
public java.util.Map<java.lang.String,SmartListenerConfig> getReferences()
public SmartListenerConfig getPropertyConfig(java.lang.String propertyName)
propertyName
- property for which to get property configpublic SmartListenerConfig listenTo(java.lang.String referenceName, @CheckForNull SmartListenerConfig config)
referenceName
- property name for which configuration should be applied.config
- passed configuration for the property. If for a given property an existing
configuration is found, the two configurations will be merged and the merged
configuration will be stored.@Deprecated public SmartListenerConfig listenTo2(java.lang.String referenceName, SmartListenerConfig config)
listenTo(String, SmartListenerConfig)
, because it merges configs too.listenTo(String, SmartListenerConfig)
.
Only if founds already registered property
doesn't emit warning, but makes merge with already registered configuration. If configurations are merged, then
passed config
VALUE is replaced with a contents of merge result.referenceName
- property name for which configuration is applicableconfig
- passed configuration. It's VALUE will be edited if another configuration will be found already
registered by given reference name. VALUE of passed reference will be changed to the merged onepublic SmartListenerConfig listenTo(java.lang.String propertyName)
propertyName
- property name ot listen to.public SmartListenerConfig listenTo(java.util.Collection<java.lang.String> propertyNames)
propertyNames
- properties' names to listen topublic SmartListenerConfig listenTo(java.lang.String... propertyNames)
propertyNames
- properties' names to listen topublic SmartListenerConfig listenToNested(java.lang.String propertyName)
propertyName
- property name to listen to.public SmartListenerConfig listenTo(SmartListenerConfig config)
config
- configpublic static SmartListenerConfig mergeConfigurations(SmartListenerConfig c1, SmartListenerConfig c2)
c1
- first configuration to merge.c2
- second configuration to merge.public static SmartListenerConfig mergeConfigurations(java.util.Collection<SmartListenerConfig> configurations)
configurations
- configurations to mergepublic void dump()