All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.xtext.xbase.impl.XBooleanLiteralImpl Maven / Gradle / Ivy

/**
 * Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.eclipse.xtext.xbase.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.xtext.xbase.XBooleanLiteral;
import org.eclipse.xtext.xbase.XbasePackage;

/**
 * 
 * An implementation of the model object 'XBoolean Literal'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.eclipse.xtext.xbase.impl.XBooleanLiteralImpl#isIsTrue Is True}
  • *
* * @generated */ public class XBooleanLiteralImpl extends XExpressionImpl implements XBooleanLiteral { /** * The default value of the '{@link #isIsTrue() Is True}' attribute. * * * @see #isIsTrue() * @generated * @ordered */ protected static final boolean IS_TRUE_EDEFAULT = false; /** * The cached value of the '{@link #isIsTrue() Is True}' attribute. * * * @see #isIsTrue() * @generated * @ordered */ protected boolean isTrue = IS_TRUE_EDEFAULT; /** * * * @generated */ protected XBooleanLiteralImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return XbasePackage.Literals.XBOOLEAN_LITERAL; } /** * * * @generated */ public boolean isIsTrue() { return isTrue; } /** * * * @generated */ public void setIsTrue(boolean newIsTrue) { boolean oldIsTrue = isTrue; isTrue = newIsTrue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XbasePackage.XBOOLEAN_LITERAL__IS_TRUE, oldIsTrue, isTrue)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XbasePackage.XBOOLEAN_LITERAL__IS_TRUE: return isIsTrue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XbasePackage.XBOOLEAN_LITERAL__IS_TRUE: setIsTrue((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XbasePackage.XBOOLEAN_LITERAL__IS_TRUE: setIsTrue(IS_TRUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XbasePackage.XBOOLEAN_LITERAL__IS_TRUE: return isTrue != IS_TRUE_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (isTrue: "); result.append(isTrue); result.append(')'); return result.toString(); } } //XBooleanLiteralImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy