|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.model.xml.impl.util.ModelUtil
public final class ModelUtil
Some Helpers useful when handling model elements.
| Constructor Summary | |
|---|---|
ModelUtil()
|
|
| Method Summary | ||
|---|---|---|
static Collection<ModelElementType> |
calculateAllBaseTypes(ModelElementType type)
Calculate a collection of all base types for the given type |
|
static Collection<ModelElementType> |
calculateAllExtendingTypes(Model model,
Collection<ModelElementType> baseTypes)
Calculate a collection of all extending types for the given base types |
|
static void |
ensureInstanceOf(Object instance,
Class<?> type)
|
|
static int |
getIndexOfElementType(ModelElementInstance modelElement,
List<ModelElementType> childElementTypes)
Find the index of the type of a model element in a list of element types |
|
static ModelElementInstance |
getModelElement(DomElement domElement,
ModelInstanceImpl modelInstance)
Returns the ModelElement for a DOM element. |
|
static
|
getModelElementCollection(Collection<DomElement> view,
ModelInstanceImpl model)
Get a collection of all model element instances in a view |
|
static QName |
getQName(String namespaceUri,
String localName)
|
|
static String |
getUniqueIdentifier(ModelElementType type)
|
|
static boolean |
valueAsBoolean(String rawValue)
|
|
static double |
valueAsDouble(String rawValue)
|
|
static float |
valueAsFloat(String rawValue)
|
|
static int |
valueAsInteger(String rawValue)
|
|
static short |
valueAsShort(String rawValue)
|
|
static String |
valueAsString(boolean booleanValue)
|
|
static String |
valueAsString(double doubleValue)
|
|
static String |
valueAsString(float floatValue)
|
|
static String |
valueAsString(int integerValue)
|
|
static String |
valueAsString(short shortValue)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelUtil()
| Method Detail |
|---|
public static ModelElementInstance getModelElement(DomElement domElement,
ModelInstanceImpl modelInstance)
ModelElement for a DOM element.
If the model element does not yet exist, it is created and linked to the DOM.
domElement - the child element to create a new ModelElement for
public static QName getQName(String namespaceUri,
String localName)
public static void ensureInstanceOf(Object instance,
Class<?> type)
public static boolean valueAsBoolean(String rawValue)
public static int valueAsInteger(String rawValue)
public static float valueAsFloat(String rawValue)
public static double valueAsDouble(String rawValue)
public static short valueAsShort(String rawValue)
public static String valueAsString(boolean booleanValue)
public static String valueAsString(int integerValue)
public static String valueAsString(float floatValue)
public static String valueAsString(double doubleValue)
public static String valueAsString(short shortValue)
public static <T extends ModelElementInstance> Collection<T> getModelElementCollection(Collection<DomElement> view,
ModelInstanceImpl model)
view - the collection of DOM elements to find the model element instances formodel - the model of the elements
public static int getIndexOfElementType(ModelElementInstance modelElement,
List<ModelElementType> childElementTypes)
modelElement - the model element which type is searched forchildElementTypes - the list to search the type
public static Collection<ModelElementType> calculateAllExtendingTypes(Model model,
Collection<ModelElementType> baseTypes)
baseTypes - the collection of types to calculate the union of all extending typespublic static Collection<ModelElementType> calculateAllBaseTypes(ModelElementType type)
public static String getUniqueIdentifier(ModelElementType type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||