use of org.eclipse.n4js.ts.types.Type in project n4js by eclipse.
the class PropertyMethodDeclarationImpl method setDefinedType.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDefinedType(Type newDefinedType) {
Type oldDefinedType = definedType;
definedType = newDefinedType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, N4JSPackage.PROPERTY_METHOD_DECLARATION__DEFINED_TYPE, oldDefinedType, definedType));
}
use of org.eclipse.n4js.ts.types.Type in project n4js by eclipse.
the class N4MethodDeclarationImpl method getDefinedFunction.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TFunction getDefinedFunction() {
final Type defType = this.getDefinedType();
TFunction _xifexpression = null;
if ((defType instanceof TFunction)) {
_xifexpression = ((TFunction) defType);
}
return _xifexpression;
}
use of org.eclipse.n4js.ts.types.Type in project n4js by eclipse.
the class N4MethodDeclarationImpl method getDefinedTypeElement.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TMember getDefinedTypeElement() {
TMember _xifexpression = null;
Type _definedType = this.getDefinedType();
boolean _tripleEquals = (_definedType == null);
if (_tripleEquals) {
_xifexpression = null;
} else {
TMember _xifexpression_1 = null;
Type _definedType_1 = this.getDefinedType();
if ((_definedType_1 instanceof TMember)) {
Type _definedType_2 = this.getDefinedType();
_xifexpression_1 = ((TMember) _definedType_2);
} else {
throw new IllegalArgumentException("");
}
_xifexpression = _xifexpression_1;
}
return _xifexpression;
}
use of org.eclipse.n4js.ts.types.Type in project n4js by eclipse.
the class TypeDefiningElementImpl method setDefinedType.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDefinedType(Type newDefinedType) {
Type oldDefinedType = definedType;
definedType = newDefinedType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, N4JSPackage.TYPE_DEFINING_ELEMENT__DEFINED_TYPE, oldDefinedType, definedType));
}
use of org.eclipse.n4js.ts.types.Type in project n4js by eclipse.
the class N4JSASTUtils method getOwnOrSuperCtor.
private static TMember getOwnOrSuperCtor(final ContainerType<?> ownerOfField) {
TClass klass = (TClass) (ownerOfField instanceof TClass ? ownerOfField : null);
while (null != klass) {
final TMember ctor = klass.findOwnedMember(CONSTRUCTOR);
if (null != ctor) {
return ctor;
}
final ParameterizedTypeRef superClassRef = klass.getSuperClassRef();
if (null == superClassRef) {
klass = null;
} else {
final Type declaredType = superClassRef.getDeclaredType();
klass = (TClass) (declaredType instanceof TClass ? declaredType : null);
}
}
return null;
}
Aggregations