@OpenApiAll
public static class Refactoring.Replacing
extends java.lang.Object
| Constructor and Description | 
|---|
Replacing()  | 
| Modifier and Type | Method and Description | 
|---|---|
static Element | 
replace(Element elementToReplace,
       Element elementToReplaceWith,
       ConvertElementInfo info)
Replaces an element with another element. 
 | 
static void | 
replacePropertyType(Property property,
                   EncapsulatedClassifier newClassifier,
                   AutomaticElementMappingRule mappingRule,
                   java.util.Map<java.util.List<Element>,java.util.List<Element>> manuallyMappedPorts)
Replaces type of the property. 
 | 
static void | 
replacePropertyType(Property property,
                   EncapsulatedClassifier newClassifier,
                   java.util.Map<java.util.List<Element>,java.util.List<Element>> manuallyMappedPorts)
Replaces type of the property. 
 | 
public static Element replace(Element elementToReplace, Element elementToReplaceWith, ConvertElementInfo info) throws ReadOnlyElementException
elementToReplace - element to replace.elementToReplaceWith - element with which to replace.info - conversion rules.ReadOnlyElementException - if given element is not editable (read-only).public static void replacePropertyType(Property property, EncapsulatedClassifier newClassifier, @CheckForNull java.util.Map<java.util.List<Element>,java.util.List<Element>> manuallyMappedPorts)
property - Property with type that owns ports.newClassifier - new EncapsulatedClassifier to become the type of the propertymanuallyMappedPorts - map of manually selected ports to map. Keys of this map are old type ports, and values
                            are new type ports. Ports are stored in lists, to describe full nested structure of nested
                            ports. If port is not nested, than list contains only one element. Else, list is full path of
                            ports starting with the port that is directly on property's old type.
                            Note: if some source port was mapped automatically, but also provided in this map,
                            then mapping value from this map will be used.public static void replacePropertyType(Property property, EncapsulatedClassifier newClassifier, AutomaticElementMappingRule mappingRule, @CheckForNull java.util.Map<java.util.List<Element>,java.util.List<Element>> manuallyMappedPorts)
property - Property with type that owns ports.newClassifier - new EncapsulatedClassifier to become the type of the propertymappingRule - AutomaticElementMappingRule describing how each old (source) port can be replaced with one of
                            new (target) ports.manuallyMappedPorts - map of manually selected ports to map. Keys of this map are old type ports, and values
                            are new type ports. Ports are stored in lists, to describe full nested structure of nested
                            ports. If port is not nested, than list contains only one element. Else, list is full path of
                            ports starting with the port that is directly on property's old type.
                            Note: if some source port was mapped using mappingRule, but also provided in this map,
                            then mapping value from this map will be used.