| /******************************************************************************* |
| * Copyright (c) 2004-2008 Akos Horvath, Gergely Varro and Daniel Varro |
| * 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: |
| * Akos Horvath, Gergely Varro - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.operation;
|
|
|
| import org.eclipse.viatra2.gtasm.patternmatcher.exceptions.PatternMatcherRuntimeException; |
| import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.MatchingFrame; |
| import org.eclipse.viatra2.gtasm.patternmatcher.impl.patternmatcher.internal.PatternMatcherErrorStrings; |
| import org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.core.AnnotatedElement; |
| |
|
|
| public class InputCheckOperation extends CheckOperation {
|
| private int index;
|
| private Object value;
|
|
|
| public InputCheckOperation(int index, Object value) {
|
| this.index = index;
|
| this.value = value;
|
| }
|
|
|
| @Override
|
| protected boolean check(MatchingFrame frame) throws PatternMatcherRuntimeException{
|
| /*if (value != null) {
|
| return frame.testAndSetValue(index, value);
|
| } else {
|
| return false;
|
| }*/ |
| |
| String[] context = {getClass().getSimpleName()}; |
| throw new PatternMatcherRuntimeException(PatternMatcherErrorStrings.INTERNAL_OPERATION_NOT_USED |
| ,context |
| ,null);
|
| } |
| |
| public AnnotatedElement getErrorfulElement(MatchingFrame frame) { |
| return null; |
| }
|
|
|
| }
|