diff options
author | 2021-08-03 18:42:39 +0900 | |
---|---|---|
committer | 2021-08-06 19:32:38 +0900 | |
commit | be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 (patch) | |
tree | 1f3f1a96251ac4f655c8a96fc33d5d4ee779cd06 /rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java | |
parent | 71ca7c6cab863767ef30c8bd05b2bbfda8731cb5 (diff) |
Initial commit
Bug-AGL: SPEC-4033
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Diffstat (limited to 'rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java')
-rw-r--r-- | rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java b/rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java new file mode 100644 index 0000000..12fa012 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ExistsOperatorImpl.java @@ -0,0 +1,87 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import rba.core.ExistsOperator; +import rba.core.ExpressionType; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Exists Operator</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ExistsOperatorImpl extends LambdaContextImpl implements ExistsOperator { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ExistsOperatorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.EXISTS_OPERATOR; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + StringBuffer expressionText = new StringBuffer(); + EList<rba.core.Expression> expressions = getOperand(); + rba.core.LambdaExpression lambda = getLambda(); + expressionText.append(getSymbol()); + expressionText.append(" "); + expressionText.append(expressions.size() > 0 ? expressions.get(0).getExpressionText() : "[Invalid_Expression]"); + expressionText.append(" "); + expressionText.append(lambda != null ? lambda.getExpressionText() : "[Invalid_Expression]"); + return expressionText.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getSymbol() { + return "Exists"; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + return ExpressionType.BOOLEAN; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.EXISTS_OPERATOR___GET_EXPRESSION_TEXT: + return getExpressionText(); + case RBACorePackage.EXISTS_OPERATOR___GET_SYMBOL: + return getSymbol(); + case RBACorePackage.EXISTS_OPERATOR___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + } + return super.eInvoke(operationID, arguments); + } + +} // ExistsOperatorImpl |