org.drools.mvel.parser.ast.expr.HalfPointFreeExpr Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* Modified by Red Hat, Inc.
*/
package org.drools.mvel.parser.ast.expr;
import com.github.javaparser.TokenRange;
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.expr.Expression;
import com.github.javaparser.ast.expr.SimpleName;
import org.drools.mvel.parser.ast.visitor.DrlGenericVisitor;
import org.drools.mvel.parser.ast.visitor.DrlVoidVisitor;
import com.github.javaparser.ast.visitor.GenericVisitor;
import com.github.javaparser.ast.visitor.VoidVisitor;
public class HalfPointFreeExpr extends Expression {
private final NodeList right;
private final SimpleName operator;
private boolean negated;
private final Expression arg1;
private final Expression arg2;
private final Expression arg3;
private final Expression arg4;
public HalfPointFreeExpr(TokenRange tokenRange, NodeList right, SimpleName operator, Boolean negated, Expression arg1, Expression arg2 , Expression arg3, Expression arg4 ) {
super(tokenRange);
this.right = right;
this.operator = operator;
this.negated = negated;
this.arg1 = arg1;
this.arg2 = arg2;
this.arg3 = arg3;
this.arg4 = arg4;
}
@Override
public R accept(GenericVisitor v, A arg) {
return ((DrlGenericVisitor)v).visit(this, arg);
}
@Override
public void accept(VoidVisitor v, A arg) {
((DrlVoidVisitor)v).visit(this, arg);
}
public NodeList getRight() {
return right;
}
public SimpleName getOperator() {
return operator;
}
public boolean isNegated() {
return negated;
}
public Expression getArg1() {
return arg1;
}
public Expression getArg2() {
return arg2;
}
public Expression getArg3() {
return arg3;
}
public Expression getArg4() {
return arg4;
}
}