/*******************************************************************************
* Copyright (c) 2010, 2015 Willink Transformations 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
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/
package org.eclipse.ocl.xtext.essentialoclcs.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.xtext.basecs.util.BaseCSVisitor;
import org.eclipse.ocl.xtext.essentialoclcs.EssentialOCLCSPackage;
import org.eclipse.ocl.xtext.essentialoclcs.ExpCS;
import org.eclipse.ocl.xtext.essentialoclcs.PrefixExpCS;
import org.eclipse.ocl.xtext.essentialoclcs.util.EssentialOCLCSVisitor;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Unary Expression CS</b></em>'.
* <!-- end-user-doc -->
*
* @generated
*/
public class PrefixExpCSImpl
extends OperatorExpCSImpl
implements PrefixExpCS {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PrefixExpCSImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return EssentialOCLCSPackage.Literals.PREFIX_EXP_CS;
}
/**
* {@inheritDoc}
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public <R> R accept(@NonNull BaseCSVisitor<R> visitor) {
return (R) ((EssentialOCLCSVisitor<?>)visitor).visitPrefixExpCS(this);
}
@Override
public ExpCS getSource()
{
if ((source == null) && !hasSource) {
hasSource = true;
ExpCS localRight = getLocalRight();
if (localRight != null) {
source = getExpressionForRight(localRight);
}
}
return source;
}
@Override
public boolean isLocalRightAncestorOf(@NonNull ExpCS csExp) { // csExp should be to the right of this for associativity resolution
return false;
}
} //UnaryExpressionCSImpl