use of org.yakindu.base.types.TypeSpecifier in project statecharts by Yakindu.
the class ExpressionsTypeInferrer method doInfer.
public InferenceResult doInfer(TypeSpecifier specifier) {
if (specifier.getType() instanceof GenericElement && ((GenericElement) specifier.getType()).getTypeParameters().size() > 0) {
List<InferenceResult> bindings = new ArrayList<>();
EList<TypeSpecifier> arguments = specifier.getTypeArguments();
for (TypeSpecifier typeSpecifier : arguments) {
InferenceResult binding = inferTypeDispatch(typeSpecifier);
if (binding != null) {
bindings.add(binding);
}
}
Type type = inferTypeDispatch(specifier.getType()).getType();
return InferenceResult.from(type, bindings);
}
return inferTypeDispatch(specifier.getType());
}
use of org.yakindu.base.types.TypeSpecifier in project statecharts by Yakindu.
the class TypeAliasImpl method basicSetTypeSpecifier.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetTypeSpecifier(TypeSpecifier newTypeSpecifier, NotificationChain msgs) {
TypeSpecifier oldTypeSpecifier = typeSpecifier;
typeSpecifier = newTypeSpecifier;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_ALIAS__TYPE_SPECIFIER, oldTypeSpecifier, newTypeSpecifier);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.yakindu.base.types.TypeSpecifier in project statecharts by Yakindu.
the class StextTestFactory method _createVariableDefinition.
public static VariableDefinition _createVariableDefinition(String name, Type type, Scope scope) {
VariableDefinition v = StextFactory.eINSTANCE.createVariableDefinition();
v.setName(name);
TypeSpecifier typeSpecifier = TypesFactory.eINSTANCE.createTypeSpecifier();
typeSpecifier.setType(type);
v.setTypeSpecifier(typeSpecifier);
if (scope != null)
scope.getDeclarations().add(v);
return v;
}
use of org.yakindu.base.types.TypeSpecifier in project statecharts by Yakindu.
the class ParameterImpl method basicSetTypeSpecifier.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetTypeSpecifier(TypeSpecifier newTypeSpecifier, NotificationChain msgs) {
TypeSpecifier oldTypeSpecifier = typeSpecifier;
typeSpecifier = newTypeSpecifier;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TypesPackage.PARAMETER__TYPE_SPECIFIER, oldTypeSpecifier, newTypeSpecifier);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.yakindu.base.types.TypeSpecifier in project statecharts by Yakindu.
the class DeclarationImpl method basicSetTypeSpecifier.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetTypeSpecifier(TypeSpecifier newTypeSpecifier, NotificationChain msgs) {
TypeSpecifier oldTypeSpecifier = typeSpecifier;
typeSpecifier = newTypeSpecifier;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TypesPackage.DECLARATION__TYPE_SPECIFIER, oldTypeSpecifier, newTypeSpecifier);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations