public class EAMethodUtil extends AbstractEAUtil
Constructor and Description |
---|
EAMethodUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addTaggedValues(org.sparx.Method m,
List<EATaggedValue> tvs)
Adds the given list of tagged values to the collection of (EA) tagged
values of the given method, NOT checking for duplicate tags.
|
static org.sparx.Parameter |
createEAParameter(org.sparx.Method m,
String name) |
static void |
deleteTaggedValue(org.sparx.Method m,
String nameOfTVToDelete)
Deletes all tagged values whose name equals (ignoring case) the given
name in the given method.
|
static SortedMap<String,EATaggedValue> |
getEATaggedValues(org.sparx.Method meth) |
static org.sparx.Parameter |
getFirstParameter(org.sparx.Method m) |
static String |
message(int mnr) |
static void |
setEACode(org.sparx.Method m,
String code)
Sets 'Code' on the given EA method.
|
static void |
setEAPos(org.sparx.Method m,
int pos)
Sets 'Pos' on the given EA method.
|
static void |
setEAStereotypeEx(org.sparx.Method m,
String stereotype)
Sets 'StereotypeEx' on the given EA method.
|
static void |
setTaggedValues(org.sparx.Method m,
List<EATaggedValue> tvs)
Sets the given tagged values in the given method.
|
createMessage, createMessage, createMessage, createMessage, stereotypesCSV
public static void setEAStereotypeEx(org.sparx.Method m, String stereotype) throws EAException
m
- stereotype
- EAException
- If updating the method did not succeed, this exception
contains the error message.public static void setEACode(org.sparx.Method m, String code) throws EAException
m
- stereotype
- EAException
- If updating the method did not succeed, this exception
contains the error message.public static void deleteTaggedValue(org.sparx.Method m, String nameOfTVToDelete)
m
- nameOfTVToDelete
- public static void setTaggedValues(org.sparx.Method m, List<EATaggedValue> tvs) throws EAException
m
- the method in which the tagged values shall be settvs
- tagged values to set, must not be null
EAException
public static void addTaggedValues(org.sparx.Method m, List<EATaggedValue> tvs) throws EAException
WARNING: Enterprise Architect may initialize default tagged values for a method that adheres to a specific UML profile. In that case, adding the same tagged values would lead to duplicates. If duplicates shall be prevented, set the tagged value instead of adding it.
m
- tvs
- collection of tagged values to addEAException
public static void setEAPos(org.sparx.Method m, int pos) throws EAException
m
- pos
- EAException
- If updating the method did not succeed, this exception
contains the error message.public static org.sparx.Parameter createEAParameter(org.sparx.Method m, String name) throws EAException
EAException
public static org.sparx.Parameter getFirstParameter(org.sparx.Method m)
m
- null
if no such parameter existspublic static SortedMap<String,EATaggedValue> getEATaggedValues(org.sparx.Method meth)
elmt
- null
public static String message(int mnr)
Copyright © 2018. All rights reserved.