@tripsnek/tmf
Version:
TypeScript Modeling Framework - A TypeScript port of the Eclipse Modeling Framework (EMF)
107 lines • 3.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EStructuralFeatureImpl = void 0;
const etyped_element_impl_1 = require("./etyped-element-impl");
class EStructuralFeatureImpl extends etyped_element_impl_1.ETypedElementImpl {
featureID = -1;
transient = false;
// private unsettable = true;
// private derived: boolean = false;
defaultValueLiteral;
defaultValue;
eContainingClass;
changeable = true;
volatile = false;
//**********************************************************************
constructor(name, eType) {
super(name, eType);
}
// public isDerived(): boolean {
// return this.derived;
// }
// public setDerived(value: boolean): void {
// this.derived = value;
// }
isTransient() {
return this.transient;
}
setTransient(value) {
this.transient = value;
}
// public isUnsettable(): boolean {
// return this.unsettable;
// }
// public setUnsettable(value: boolean): void {
// this.unsettable = value;
// }
isVolatile() {
return this.volatile;
}
setVolatile(value) {
this.volatile = value;
}
setFeatureID(value) {
this.featureID = value;
}
getFeatureID() {
return this.featureID;
}
// public isList() {
// return (
// this.getUpperBound() === EStructuralFeatureImpl.UNBOUNDED_MULTIPLICITY &&
// this.isOrdered() &&
// !this.isUnique()
// );
// }
// public isSet() {
// return (
// this.getUpperBound() === EStructuralFeatureImpl.UNBOUNDED_MULTIPLICITY &&
// !this.isOrdered() &&
// this.isUnique()
// );
// }
/**
* Needed for BasicEList, which cannot import EReference without inducing
* a circular import.
*/
isContainment() {
return false;
}
// public getContainerClass(): string | null {
// // TODO: Note that EClass.getInstanceClass() is not yet implemented...
// // return this._eContainingClass.getInstanceClass();
// return null;
// }
getDefaultValue() {
return this.defaultValue;
}
setDefaultValue(value) {
this.defaultValue = value;
}
getDefaultValueLiteral() {
return this.defaultValueLiteral;
}
setDefaultValueLiteral(value) {
this.defaultValueLiteral = value;
}
getEContainingClass() {
return this.eContainingClass;
}
//TODO: GET RID OF THIS. Should not be public, should be handled by EOpposite
// NOTE: Parallel to EOperation
setEContainingClass(owner) {
if (owner)
this.eContainingClass = owner;
}
isChangeable() {
return this.changeable;
}
setChangeable(value) {
this.changeable = value;
}
eContainer() {
return this.eContainingClass;
}
}
exports.EStructuralFeatureImpl = EStructuralFeatureImpl;
//# sourceMappingURL=estructural-feature-impl.js.map