public class QvtOperationalParserUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
QVT_AUTOGEN_MODELPARAM_EXPRESSION_URI |
static String |
QVT_NAMESPACE_URI |
public static final String QVT_NAMESPACE_URI
public static final String QVT_AUTOGEN_MODELPARAM_EXPRESSION_URI
public static EClassifier getContextualType(ImperativeOperation operation)
public static boolean isContextual(ImperativeOperation operation)
public static String getMappingStringRepresentation(MappingMethodCS operationCS)
public static String getStringRepresentation(PathNameCS pathName, String pathSeparator)
public static String getStringRepresentation(PathNameCS pathName)
public static String getStringRepresentation(List<SimpleNameCS> pathName, String pathSeparator)
public static String getStringRepresentation(ScopedNameCS scopedNameCS)
public static void setInitExpression(EStructuralFeature moduleFeature, OCLExpression<EClassifier> expression)
public static OCLExpression<EClassifier> getInitExpression(EStructuralFeature feature)
public static Module getOwningModule(ImperativeOperation operation)
public static Module getOwningModule(EOperation operation)
public static List<EOperation> getOwnedOperations(Module module)
public static void collectAllImports(CompiledUnit unit, Set<CompiledUnit> result)
public static Set<Module> collectAllImportsByKind(Module module, Set<Module> result, ImportKind importKind)
public static boolean isAssignableToFrom(Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env, EClassifier variableType, EClassifier initialiserType)
false
if any
of the type argument is null
public static String getMappingModuleSimpleName(TransformationHeaderCS headerCS)
public static boolean hasSimpleName(TransformationHeaderCS headerCS)
public static String getMappingModuleQualifiedName(TransformationHeaderCS headerCS)
public static String getMappingModuleNamespace(TransformationHeaderCS headerCS)
public static boolean isTypeCast(EOperation operation)
public static boolean isIncorrectCast(EClassifier sourceType, EClassifier targetType)
public static boolean validateAssignment(boolean isProperty, String leftName, EClassifier leftType, EClassifier rightType, boolean isIncremental, CSTNode lValueCS, CSTNode rValueCS, Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env)
public static boolean validateVariableModification(Variable<EClassifier,EParameter> variable, CSTNode varNodeCS, EStructuralFeature varPathNamePropertyASTopt, Environment<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint,EClass,EObject> env, boolean isDirectModification)
variable
- the variable to be assigned a value or indirectly modified through
an owned propertyvarNodeCS
- the pathname representing the left side of an assignment. It can be a simple name
representing a variable direct access or a path navigating to owned property.varPathNamePropertyASTopt
- AST property element for a property if any available as the target for modificationtrue
if it can be modified, false
otherwise.public static ImperativeOperation getMainOperation(Module module)
main
.
Note: This method isolates the caller from the legacy QVT AST model incompatibility, allowing a mapping to be the entry operation, while the OMG specification requires EntryOperation only.
public static boolean isOverloadableMapping(EOperation op, QvtOperationalEnv env)
public static String safeGetMappingQualifiedName(QvtOperationalEnv env, ImperativeOperation operation)
public static String safeGetQualifiedName(QvtOperationalEnv env, EClassifier type, String defaultValue)
UMLReflection.getQualifiedName(Object)
operation.type
- a classifier that may be null
defaultValue
- the default value if a non-null can not be deriveddefaultValue
if a non-null name can not be
derivedpublic static String safeGetQualifiedName(UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint> umlReflection, EClassifier type, String defaultValue)
public static String safeGetQualifiedName(QvtOperationalEnv env, EClassifier type)
UMLReflection.getQualifiedName(Object)
operation.type
- a classifier that may be null
public static void markAsUnsupported(EModelElement element, String reason)
public static boolean isUnsupported(EModelElement element)
public static String getUnsupportedReason(EModelElement element)
public static void markAsDeprecated(EModelElement element)
public static void markAsDeprecated(EModelElement element, String replacingReferenceOpt)
public static boolean isDeprecated(EModelElement element)
public static String getDeprecatedBy(EModelElement element)
public static boolean isAbstractOperation(ImperativeOperation operation)
public static void markAsStaticOperation(EOperation operation)
public static boolean isStaticOperation(EOperation operation)
public static CSTNode getPropertyProblemNode(EStructuralFeature feature, QvtOperationalEnv env)
public static CSTNode getMethodNameProblemNodeCS(MappingMethodCS methodCS)
public static CSTNode getMethodHeaderProblemNodeCS(MappingMethodCS methodCS)
public static <T> Collection<T> selectDuplicateQualifiers(List<T> elements)
public static Module createModule(MappingModuleCS moduleCS)
public static List<ModelTypeCS> getModelTypes(UnitCS unitCS)
public static Variable<EClassifier,EParameter> getThisVariable(Module module)
public static boolean isExtendingEnv(QvtEnvironmentBase env, Module extended)
public static List<String> getSequenceOfNames(List<SimpleNameCS> names)
public static boolean hasOperationBody(MappingMethodCS methodCS)
public static boolean isDisjunctiveMappingOperation(MappingMethodCS methodCS)
Copyright © 2008, 2018 Borland Software Corporation and others. All Rights Reserved.