Search in sources :

Example 11 with TSetter

use of org.eclipse.n4js.ts.types.TSetter in project n4js by eclipse.

the class TypeUtils method createTSetter.

/**
 * Creates a TSetter. If 'fparName' or 'fparTypeRef' is non-null, a TFormalParameter will be created as well. All
 * arguments may be <code>null</code>.
 */
public static TSetter createTSetter(String name, String fparName, TypeRef fparTypeRef) {
    final TSetter ph = TypesFactory.eINSTANCE.createTSetter();
    ph.setName(name);
    if (fparName != null || fparTypeRef != null) {
        final TFormalParameter fpar = TypesFactory.eINSTANCE.createTFormalParameter();
        fpar.setName(fparName);
        fpar.setTypeRef(TypeUtils.copyIfContained(TypeRefsFactory.eINSTANCE.createUnknownTypeRef()));
        ph.setFpar(fpar);
    }
    return ph;
}
Also used : TSetter(org.eclipse.n4js.ts.types.TSetter) TFormalParameter(org.eclipse.n4js.ts.types.TFormalParameter)

Example 12 with TSetter

use of org.eclipse.n4js.ts.types.TSetter in project n4js by eclipse.

the class SetterDeclarationImpl method setDefinedSetter.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setDefinedSetter(TSetter newDefinedSetter) {
    TSetter oldDefinedSetter = definedSetter;
    definedSetter = newDefinedSetter;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, N4JSPackage.SETTER_DECLARATION__DEFINED_SETTER, oldDefinedSetter, definedSetter));
}
Also used : TSetter(org.eclipse.n4js.ts.types.TSetter) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

TSetter (org.eclipse.n4js.ts.types.TSetter)12 TGetter (org.eclipse.n4js.ts.types.TGetter)7 TField (org.eclipse.n4js.ts.types.TField)6 TMethod (org.eclipse.n4js.ts.types.TMethod)4 AccessorTuple (org.eclipse.n4js.ts.types.util.AccessorTuple)4 TMember (org.eclipse.n4js.ts.types.TMember)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 EObject (org.eclipse.emf.ecore.EObject)2 TInterface (org.eclipse.n4js.ts.types.TInterface)2 NameStaticPair (org.eclipse.n4js.ts.types.util.NameStaticPair)2 Pair (org.eclipse.xtext.xbase.lib.Pair)2 LinkedHashMultimap (com.google.common.collect.LinkedHashMultimap)1 Inject (com.google.inject.Inject)1 Singleton (com.google.inject.Singleton)1 Collections (java.util.Collections)1 Collections.emptyList (java.util.Collections.emptyList)1 Iterator (java.util.Iterator)1 LinkedHashSet (java.util.LinkedHashSet)1