Search in sources :

Example 11 with Type

use of org.yakindu.base.types.Type in project statecharts by Yakindu.

the class StextTestFactory method _createVoidType.

public static Type _createVoidType(String name) {
    Type t = TypesFactory.eINSTANCE.createPrimitiveType();
    t.setName(name);
    return t;
}
Also used : TimeEventType(org.yakindu.sct.model.stext.stext.TimeEventType) Type(org.yakindu.base.types.Type)

Example 12 with Type

use of org.yakindu.base.types.Type in project statecharts by Yakindu.

the class TypeSpecifierImpl method setType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setType(Type newType) {
    Type oldType = type;
    type = newType;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_SPECIFIER__TYPE, oldType, type));
}
Also used : Type(org.yakindu.base.types.Type) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 13 with Type

use of org.yakindu.base.types.Type in project statecharts by Yakindu.

the class AbstractTypeSystem method getOperationExtensions.

@Override
public List<Operation> getOperationExtensions(Type type) {
    List<Operation> result = new ArrayList<>();
    result.addAll(extensionOperationRegistry.get(type));
    List<Type> superTypes = getSuperTypes(type);
    for (Type superType : superTypes) {
        result.addAll(extensionOperationRegistry.get(superType));
    }
    return result;
}
Also used : PrimitiveType(org.yakindu.base.types.PrimitiveType) Type(org.yakindu.base.types.Type) ArrayList(java.util.ArrayList) Operation(org.yakindu.base.types.Operation)

Example 14 with Type

use of org.yakindu.base.types.Type in project statecharts by Yakindu.

the class TypeParameterImpl method setBound.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setBound(Type newBound) {
    Type oldBound = bound;
    bound = newBound;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_PARAMETER__BOUND, oldBound, bound));
}
Also used : Type(org.yakindu.base.types.Type) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 15 with Type

use of org.yakindu.base.types.Type in project statecharts by Yakindu.

the class StextTestFactory method _createStringType.

public static Type _createStringType(String name) {
    Type t = TypesFactory.eINSTANCE.createPrimitiveType();
    t.setName(name);
    return t;
}
Also used : TimeEventType(org.yakindu.sct.model.stext.stext.TimeEventType) Type(org.yakindu.base.types.Type)

Aggregations

Type (org.yakindu.base.types.Type)24 PrimitiveType (org.yakindu.base.types.PrimitiveType)8 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)5 TimeEventType (org.yakindu.sct.model.stext.stext.TimeEventType)5 ArrayList (java.util.ArrayList)4 ComplexType (org.yakindu.base.types.ComplexType)4 GenericElement (org.yakindu.base.types.GenericElement)3 TypeParameter (org.yakindu.base.types.TypeParameter)3 LinkedHashSet (java.util.LinkedHashSet)2 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)2 Check (org.eclipse.xtext.validation.Check)2 CheckType (org.eclipse.xtext.validation.CheckType)2 Expression (org.yakindu.base.expressions.expressions.Expression)2 EnumerationType (org.yakindu.base.types.EnumerationType)2 Operation (org.yakindu.base.types.Operation)2 Inject (com.google.inject.Inject)1 Collections (java.util.Collections)1 Comparator (java.util.Comparator)1 List (java.util.List)1 Optional (java.util.Optional)1