Class ProfilingTool
- java.lang.Object
-
- java.util.Observable
-
- com.nomagic.magicreport.engine.Tool
-
- com.nomagic.magicdraw.magicreport.tools.ProfilingTool
-
- All Implemented Interfaces:
com.nomagic.magicreport.engine.ITool
,com.nomagic.magicreport.IVariable
,java.io.Serializable
,java.lang.Cloneable
@OpenApiAll public class ProfilingTool extends com.nomagic.magicreport.engine.Tool
Contains utilities functions for profiling MagicDraw meta-model. Context name of this class is "profiling".- Since:
- November 27, 2007
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONTEXT_NAME
Contains a context name.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ProfilingTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getArrayTypeName(java.lang.String signature)
java.lang.String
getDeclaringElementName(java.lang.String modelName, java.lang.String propertyName)
Retrieve the name of meta-model which property name is declared.java.util.Collection<java.lang.String>
getElementProperties(Element element)
Return Collection of element properties name.java.util.Collection<java.lang.String>
getElementProperties(java.lang.String modelName)
Retrieve Collection of element properties name from meta-model name.java.lang.Object
getElementProperty(Element element, java.lang.String propertyName)
Retrieve property value of specified element and property name.java.util.Collection<java.lang.String>
getGeneralizationName(java.lang.String modelName)
Return generalization model of modelName.java.lang.String
getHumanPropertyName(java.lang.String propertyName)
Return text representing property name.private java.lang.String
getPrimitiveTypeName(java.lang.Class<?> clazz)
java.lang.String
getPropertyTypeName(Element element, java.lang.String propertyName)
Retrieve type of property.java.lang.String
getPropertyTypeName(java.lang.String modelName, java.lang.String propertyName)
Retrieve type of property.private java.lang.String
getSimpleTypeName(java.lang.Class<?> clazz)
Translate the result of Class.getName (the type descriptor) into a type name suitable for use in a declaration.-
Methods inherited from class com.nomagic.magicreport.engine.Tool
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
-
-
-
-
Field Detail
-
CONTEXT_NAME
public static final java.lang.String CONTEXT_NAME
Contains a context name.- See Also:
- Constant Field Values
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSimpleTypeName
private java.lang.String getSimpleTypeName(java.lang.Class<?> clazz)
Translate the result of Class.getName (the type descriptor) into a type name suitable for use in a declaration. Note: this method does not handle inner classes.
-
getPrimitiveTypeName
private java.lang.String getPrimitiveTypeName(java.lang.Class<?> clazz)
-
getArrayTypeName
private java.lang.String getArrayTypeName(java.lang.String signature)
-
getGeneralizationName
public java.util.Collection<java.lang.String> getGeneralizationName(java.lang.String modelName)
Return generalization model of modelName.- Parameters:
modelName
- meta-model name- Returns:
- generalization model
-
getDeclaringElementName
public java.lang.String getDeclaringElementName(java.lang.String modelName, java.lang.String propertyName)
Retrieve the name of meta-model which property name is declared.- Parameters:
modelName
- meta-model namepropertyName
- property name- Returns:
- name of meta-model
-
getPropertyTypeName
public java.lang.String getPropertyTypeName(java.lang.String modelName, java.lang.String propertyName)
Retrieve type of property.- Parameters:
modelName
- meta-model namepropertyName
- property name- Returns:
- name of property type
-
getPropertyTypeName
public java.lang.String getPropertyTypeName(Element element, java.lang.String propertyName)
Retrieve type of property.- Parameters:
element
- target elementpropertyName
- property name- Returns:
- name of property type
-
getElementProperties
public java.util.Collection<java.lang.String> getElementProperties(java.lang.String modelName)
Retrieve Collection of element properties name from meta-model name.- Parameters:
modelName
- meta-model name- Returns:
- collection of element properties
-
getElementProperties
public java.util.Collection<java.lang.String> getElementProperties(Element element)
Return Collection of element properties name.- Parameters:
element
- target element- Returns:
- collection of element properties
-
getElementProperty
public java.lang.Object getElementProperty(Element element, java.lang.String propertyName)
Retrieve property value of specified element and property name.- Parameters:
element
- target elementpropertyName
- property name- Returns:
- an Object of element property name.
-
getHumanPropertyName
public java.lang.String getHumanPropertyName(java.lang.String propertyName)
Return text representing property name.- Parameters:
propertyName
- property name- Returns:
- a human name of given
propertyName
-
-