|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.tpt.aadl.annex.behavior.utils.AadlBaUtils
public class AadlBaUtils
A collection of static utils methods.
Field Summary | |
---|---|
static java.lang.String |
STRING_NAME_SEPARATOR
String separator for a component reference name. |
Constructor Summary | |
---|---|
AadlBaUtils()
|
Method Summary | ||
---|---|---|
static boolean |
compareBehaviorTransitionPriority(BehaviorTransition bt1,
BehaviorTransition bt2)
Compares behavior transition priorities. |
|
static
|
compareNamedElementList(java.lang.String name,
org.eclipse.emf.common.util.EList<T> lbne)
Compare a given name to a given list of behavior named elements. |
|
static org.osate.aadl2.Classifier |
componentPrototypeResolver(org.osate.aadl2.ComponentPrototype prototype,
org.osate.aadl2.ComponentClassifier baParentContainer)
Resolves the given component prototype by returning the binded classifier or if there is no binded classifier, the constraining classifier. |
|
static java.util.Comparator<BehaviorTime> |
createBehaviorTimeComparator()
Create a behavior time comparator. |
|
static org.osate.aadl2.ClassifierValue |
getBaseType(org.osate.aadl2.Classifier component)
Returns the last value of the base type property of the given component or null if the base type property is not set. |
|
static BehaviorFeatureType |
getBehaviorAnnexFeatureType(BehaviorElement el)
Analyze the given behavior annex feature and returns its type. |
|
static org.osate.aadl2.Classifier |
getClassifier(org.osate.aadl2.Element el,
org.osate.aadl2.ComponentClassifier baParentContainer)
Returns the given Element object's classifier. |
|
static FeatureType |
getCompPrototypeType(org.osate.aadl2.ComponentPrototypeBinding cpb)
Translates the given ComponentPrototypeBinding object into a FeatureType enumeration. |
|
static java.lang.String |
getDataAccessRight(Target tar)
If the given Target object is a DataAccessHolder object or a DataComponentReference object which first element is a DataAccessHolder object, it returns the data access right or null if the default
data access right is not set. |
|
static org.osate.aadl2.DataClassifier |
getDataClassifier(Value v)
Returns the DataClassifier of the element binded to the given Value object. |
|
static DataRepresentation |
getDataRepresentation(BehaviorPropertyConstant pc)
Returns the data representation associated to the given BehaviorPropertyConstant object Note : getDataRepresentation(PropertyType) to see restrictions. |
|
static DataRepresentation |
getDataRepresentation(BehaviorPropertyValue pv)
Returns the data representation associated to the given BehaviorPropertyValue object Note : getDataRepresentation(PropertyType) to see restrictions. |
|
static DataRepresentation |
getDataRepresentation(BehaviorVariable bv)
Returns the data representation of the given BehaviorVariable object or DataRepresentation.UNKNOWN if Data_Model::Data_Representation property is not set or if the BehaviorVariable object represents a data structure. |
|
static DataRepresentation |
getDataRepresentation(org.osate.aadl2.DataClassifier c)
Returns the last data representation from the property stack of the given data classifier or DataRepresentation.UNKNOWN if Data_Model::Data_Representation property is not set or if the data classifier represents a data structure. |
|
static DataRepresentation |
getDataRepresentation(org.osate.aadl2.PropertyType type)
Returns the data representation associated to the given PropertyType object. |
|
static DataRepresentation |
getDataRepresentation(Value v)
Returns the data representation associated to the given Value object. |
|
static DataRepresentation |
getDataRepresentation(ValueConstant v)
Returns the data representation associated to the given ValueConstant object Note : getDataRepresentation(PropertyType)
to see restrictions on property constant and value. |
|
static DataRepresentation |
getDataRepresentation(ValueVariable v)
Returns the data representation of the given ValueVariable object or DataRepresentation.UNKNOWN if Data_Model::Data_Representation property is not set or if the ValueVariable object represents a data structure. |
|
static org.osate.aadl2.DirectionType |
getDirectionType(Target tar)
Returns the direction type of the object binded to the given Target or null if the binded object is not an instance of : _ DirectedFeature. |
|
static FeatureType |
getFeatPrototypeType(org.osate.aadl2.FeaturePrototypeBinding fpb)
Translates the given FeaturePrototypeBinding object into a FeatureType enumeration. |
|
static FeatureType |
getFeatureType(org.osate.aadl2.Element el)
Analyze the given AADL Osate element and return its enumeration type. |
|
static java.lang.String |
getName(org.osate.aadl2.ModeTransitionTrigger mtt)
Returns the name of the given ModeTransitionTrigger object. |
|
static fr.tpt.aadl.annex.behavior.analyzers.TypeHolder |
getTypeHolder(org.osate.aadl2.Element el)
Returns the TypeHolder (data representation and component's DataClassifier if any) of the given Element object. |
|
static java.lang.String |
identifierListToString(org.eclipse.emf.common.util.EList<BehaviorState> bsl,
java.lang.String separator)
Constructs a string base on the name of the given behavior states list, separated by the given separator symbol. |
|
static Value |
isOnlyOneValue(ValueExpression ve)
If the given value expression is composed of an single value, it returns this value otherwise null . |
|
static boolean |
isSameTarget(Target tar0,
Target tar1)
Compare the given Target objects. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STRING_NAME_SEPARATOR
Constructor Detail |
---|
public AadlBaUtils()
Method Detail |
---|
public static DataRepresentation getDataRepresentation(org.osate.aadl2.DataClassifier c)
c
- the given data classifier
public static DataRepresentation getDataRepresentation(BehaviorVariable bv)
bv
- the given BehaviorVariable object
public static DataRepresentation getDataRepresentation(org.osate.aadl2.PropertyType type)
type
- the given PropertyType object.
java.lang.UnsupportedOperationException
- for the unsupported typespublic static DataRepresentation getDataRepresentation(BehaviorPropertyConstant pc)
getDataRepresentation(PropertyType)
to see restrictions.
pc
- the given BehaviorPropertyConstant object
java.lang.UnsupportedOperationException
- for the unsupported typespublic static DataRepresentation getDataRepresentation(BehaviorPropertyValue pv)
getDataRepresentation(PropertyType)
to see restrictions.
pv
- the given BehaviorPropertyValue object
java.lang.UnsupportedOperationException
- for the unsupported typespublic static DataRepresentation getDataRepresentation(ValueConstant v)
getDataRepresentation(PropertyType)
to see restrictions on property constant and value.
v
- the given ValueConstant object
java.lang.UnsupportedOperationException
- for the unsupported typespublic static DataRepresentation getDataRepresentation(ValueVariable v)
v
- the given ValueVariable object
public static DataRepresentation getDataRepresentation(Value v)
getDataRepresentation(PropertyType)
to see restrictions on property constant and value.
v
- the given Value object
java.lang.UnsupportedOperationException
- for the unsupported typespublic static java.lang.String identifierListToString(org.eclipse.emf.common.util.EList<BehaviorState> bsl, java.lang.String separator)
bsl
- the given behavior states listseparator
- the name separator symbol
public static org.osate.aadl2.Classifier getClassifier(org.osate.aadl2.Element el, org.osate.aadl2.ComponentClassifier baParentContainer)
null
if the prototype is
not defined.
el
- the given Element objectbaParentContainer
- the ba's parent component.
null
if the prototype is
not defined
java.lang.UnsupportedOperationException
- for unsupported element
object types.public static org.osate.aadl2.Classifier componentPrototypeResolver(org.osate.aadl2.ComponentPrototype prototype, org.osate.aadl2.ComponentClassifier baParentContainer)
null
if the given component prototype is not defined.
prototype
- the given component prototypebaParentContainer
- the ba's parent component
null
public static org.osate.aadl2.DataClassifier getDataClassifier(Value v)
getClassifier(Element, ComponentClassifier)
to see the restrictions.
null
.
v
- the given Value object
null
for
the ValueConstant objects (excepted BehaviorEnumerationLiteral object)
java.lang.UnsupportedOperationException
- for unsupported binded
object types.public static fr.tpt.aadl.annex.behavior.analyzers.TypeHolder getTypeHolder(org.osate.aadl2.Element el) throws DimensionException
el
- the given Element object.
java.lang.UnsupportedOperationException
- for the unsupported types
or Element instances.
DimensionException
- in any case of array dimension overflow.public static <T extends BehaviorNamedElement> T compareNamedElementList(java.lang.String name, org.eclipse.emf.common.util.EList<T> lbne)
bne
- the given namelbne
- the given list of behavior named elements
null
otherwisepublic static boolean isSameTarget(Target tar0, Target tar1)
tar0
- the first nametar1
- the second name
true
if the given Target objects are the same.
Otherwise returns false
public static java.util.Comparator<BehaviorTime> createBehaviorTimeComparator()
java.lang.UnsupportedOperationException
- if behavior time objects are not
integer constant literalpublic static FeatureType getFeatureType(org.osate.aadl2.Element el)
org.osate.parser.AadlSemanticCheckSwitch#getFeatureType
el
- the given AADL Osate element
java.lang.UnsupportedOperationException
- for the unsupported typespublic static BehaviorFeatureType getBehaviorAnnexFeatureType(BehaviorElement el)
el
- the given behavior annex feature
java.lang.UnsupportedOperationException
- for the unsupported typespublic static Value isOnlyOneValue(ValueExpression ve)
null
. Recursive method.
ve
- the given value expression
null
public static FeatureType getCompPrototypeType(org.osate.aadl2.ComponentPrototypeBinding cpb)
fpb
- the given ComponentPrototypeBinding
java.lang.UnsupportedOperationException
- for the unsupported typespublic static FeatureType getFeatPrototypeType(org.osate.aadl2.FeaturePrototypeBinding fpb)
fpb
- the given FeaturePrototypeBinding
java.lang.UnsupportedOperationException
- for the unsupported typespublic static org.osate.aadl2.ClassifierValue getBaseType(org.osate.aadl2.Classifier component)
null
if the base type property is not set.
component
- the given component
null
public static org.osate.aadl2.DirectionType getDirectionType(Target tar)
null
if the binded object is not an instance of : _ DirectedFeature.(see
_ Data subcomponent.
_ Local variable.
getDirectionType(org.osate.aadl2.Element)
).
tar
- the given Target
null
public static java.lang.String getDataAccessRight(Target tar)
null
if the default
data access right is not set. Else it returns null
.
tar
- the given Target object
null
Aadl2Utils.getAccessRight
public static java.lang.String getName(org.osate.aadl2.ModeTransitionTrigger mtt)
mtt
- the given ModeTransitionTrigger object
public static boolean compareBehaviorTransitionPriority(BehaviorTransition bt1, BehaviorTransition bt2)
true
if bt1 priority is > bt2 or bt2 has otherwise execution
condition and bt1 hasn't. Otherwise returns false
.
bt1
- a behavior transitionbt2
- an other behavior transition
true
if bt1 priority is > bt2 or bt2 has otherwise execution
condition and bt1 hasn't. Otherwise false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |