use of org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef in project n4js by eclipse.
the class WildcardImpl method getDeclaredOrImplicitUpperBound.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TypeRef getDeclaredOrImplicitUpperBound() {
final TypeRef declUB = this.getDeclaredUpperBound();
if ((declUB != null)) {
return declUB;
}
TypeRef _declaredLowerBound = this.getDeclaredLowerBound();
boolean _tripleNotEquals = (_declaredLowerBound != null);
if (_tripleNotEquals) {
return null;
}
final EObject parent = this.eContainer();
if ((parent instanceof ParameterizedTypeRef)) {
final int typeArgIndex = ((ParameterizedTypeRef) parent).getTypeArgs().indexOf(this);
if ((typeArgIndex >= 0)) {
final Object declType = ((ParameterizedTypeRef) parent).eGet(TypeRefsPackage.eINSTANCE.getParameterizedTypeRef_DeclaredType(), false);
if ((declType instanceof ContainerType<?>)) {
boolean _eIsProxy = ((ContainerType<?>) declType).eIsProxy();
boolean _not = (!_eIsProxy);
if (_not) {
final EList<TypeVariable> typeVars = ((ContainerType<?>) declType).getTypeVars();
TypeVariable _xifexpression = null;
int _size = typeVars.size();
boolean _lessThan = (typeArgIndex < _size);
if (_lessThan) {
_xifexpression = typeVars.get(typeArgIndex);
} else {
_xifexpression = null;
}
final TypeVariable typeVar = _xifexpression;
if ((typeVar != null)) {
final TypeRef implicitUB = typeVar.getDeclaredUpperBound();
return implicitUB;
}
}
}
}
}
return null;
}
use of org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef in project n4js by eclipse.
the class TClassImpl method basicSetSuperClassRef.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSuperClassRef(ParameterizedTypeRef newSuperClassRef, NotificationChain msgs) {
ParameterizedTypeRef oldSuperClassRef = superClassRef;
superClassRef = newSuperClassRef;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TypesPackage.TCLASS__SUPER_CLASS_REF, oldSuperClassRef, newSuperClassRef);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef in project n4js by eclipse.
the class TObjectPrototypeImpl method basicSetSuperType.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSuperType(ParameterizedTypeRef newSuperType, NotificationChain msgs) {
ParameterizedTypeRef oldSuperType = superType;
superType = newSuperType;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TypesPackage.TOBJECT_PROTOTYPE__SUPER_TYPE, oldSuperType, newSuperType);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef in project n4js by eclipse.
the class TClassImpl method getSuperClassifierRefs.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Iterable<ParameterizedTypeRef> getSuperClassifierRefs() {
ParameterizedTypeRef _superClassRef = this.getSuperClassRef();
boolean _tripleNotEquals = (_superClassRef != null);
if (_tripleNotEquals) {
return Iterables.<ParameterizedTypeRef>concat(Collections.<ParameterizedTypeRef>singleton(this.getSuperClassRef()), this.getImplementedInterfaceRefs());
}
return Iterables.<ParameterizedTypeRef>concat(this.getImplementedInterfaceRefs());
}
use of org.eclipse.n4js.ts.typeRefs.ParameterizedTypeRef in project n4js by eclipse.
the class TClassImpl method getSuperClass.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TClass getSuperClass() {
ParameterizedTypeRef _superClassRef = this.getSuperClassRef();
Type _declaredType = null;
if (_superClassRef != null) {
_declaredType = _superClassRef.getDeclaredType();
}
final Type superType = _declaredType;
TClass _xifexpression = null;
if ((superType instanceof TClass)) {
_xifexpression = ((TClass) superType);
} else {
_xifexpression = null;
}
return _xifexpression;
}
Aggregations