use of org.eclipse.n4js.ts.types.MemberAccessModifier in project n4js by eclipse.
the class TMethodImpl method setDeclaredMemberAccessModifier.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDeclaredMemberAccessModifier(MemberAccessModifier newDeclaredMemberAccessModifier) {
MemberAccessModifier oldDeclaredMemberAccessModifier = declaredMemberAccessModifier;
declaredMemberAccessModifier = newDeclaredMemberAccessModifier == null ? DECLARED_MEMBER_ACCESS_MODIFIER_EDEFAULT : newDeclaredMemberAccessModifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TMETHOD__DECLARED_MEMBER_ACCESS_MODIFIER, oldDeclaredMemberAccessModifier, declaredMemberAccessModifier));
}
use of org.eclipse.n4js.ts.types.MemberAccessModifier in project n4js by eclipse.
the class TMemberWithAccessModifierImpl method setDeclaredMemberAccessModifier.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDeclaredMemberAccessModifier(MemberAccessModifier newDeclaredMemberAccessModifier) {
MemberAccessModifier oldDeclaredMemberAccessModifier = declaredMemberAccessModifier;
declaredMemberAccessModifier = newDeclaredMemberAccessModifier == null ? DECLARED_MEMBER_ACCESS_MODIFIER_EDEFAULT : newDeclaredMemberAccessModifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TMEMBER_WITH_ACCESS_MODIFIER__DECLARED_MEMBER_ACCESS_MODIFIER, oldDeclaredMemberAccessModifier, declaredMemberAccessModifier));
}
use of org.eclipse.n4js.ts.types.MemberAccessModifier in project n4js by eclipse.
the class TMemberWithAccessModifierImpl method getMemberAccessModifier.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MemberAccessModifier getMemberAccessModifier() {
MemberAccessModifier _declaredMemberAccessModifier = this.getDeclaredMemberAccessModifier();
boolean _tripleEquals = (_declaredMemberAccessModifier == MemberAccessModifier.UNDEFINED);
if (_tripleEquals) {
final EObject parent = this.eContainer();
if ((parent instanceof TInterface)) {
final MemberAccessModifier modifierDerivedFromType = AccessModifiers.toMemberModifier(((Type) parent).getTypeAccessModifier());
if ((modifierDerivedFromType != MemberAccessModifier.PRIVATE)) {
return modifierDerivedFromType;
}
}
return MemberAccessModifier.PROJECT;
}
return this.getDeclaredMemberAccessModifier();
}
use of org.eclipse.n4js.ts.types.MemberAccessModifier in project n4js by eclipse.
the class AccessModifiers method checkedLess.
/**
* Similar to {@link #less(TMember, TMember)}, but the access modifiers of both members are "checked" (and
* {@link #fixed(TMember)} if necessary) before comparison. This is done to avoid strange error messages (or
* strangely omitted error messages) due to wrong accessors.
*/
public static boolean checkedLess(TMember left, TMember right) {
MemberAccessModifier fixedLeft = fixed(left);
MemberAccessModifier fixedRight = fixed(right);
return less(fixedLeft, fixedRight);
}
Aggregations