soot.JastAddJ.PostfixExpr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soot Show documentation
Show all versions of soot Show documentation
A Java Optimization Framework
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */
package soot.JastAddJ;
import java.util.HashSet;
import java.io.File;
import java.util.*;
import beaver.*;
import java.util.ArrayList;
import java.util.zip.*;
import java.io.*;
import java.io.FileNotFoundException;
import java.util.Collection;
import soot.*;
import soot.util.*;
import soot.jimple.*;
import soot.coffi.ClassFile;
import soot.coffi.method_info;
import soot.coffi.CONSTANT_Utf8_info;
import soot.tagkit.SourceFileTag;
import soot.coffi.CoffiMethodSource;
/**
* @production PostfixExpr : {@link Unary};
* @ast node
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:146
*/
public abstract class PostfixExpr extends Unary implements Cloneable {
/**
* @apilevel low-level
*/
public void flushCache() {
super.flushCache();
}
/**
* @apilevel internal
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/**
* @apilevel internal
*/
@SuppressWarnings({"unchecked", "cast"})
public PostfixExpr clone() throws CloneNotSupportedException {
PostfixExpr node = (PostfixExpr)super.clone();
node.in$Circle(false);
node.is$Final(false);
return node;
}
/**
* @ast method
* @aspect DefiniteAssignment
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:63
*/
public void definiteAssignment() {
if(getOperand().isVariable()) {
Variable v = getOperand().varDecl();
if(v != null && v.isFinal()) {
error("++ and -- can not be applied to final variable " + v);
}
}
}
/**
* @ast method
* @aspect DA
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:471
*/
protected boolean checkDUeverywhere(Variable v) {
if(getOperand().isVariable() && getOperand().varDecl() == v)
if(!isDAbefore(v))
return false;
return super.checkDUeverywhere(v);
}
/**
* @ast method
* @aspect TypeCheck
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:293
*/
public void typeCheck() {
if(!getOperand().isVariable())
error("postfix expressions only work on variables");
else if(!getOperand().type().isNumericType())
error("postfix expressions only operates on numeric types");
}
/**
* @ast method
*
*/
public PostfixExpr() {
super();
}
/**
* Initializes the child array to the correct size.
* Initializes List and Opt nta children.
* @apilevel internal
* @ast method
* @ast method
*
*/
public void init$Children() {
children = new ASTNode[1];
}
/**
* @ast method
*
*/
public PostfixExpr(Expr p0) {
setChild(p0, 0);
}
/**
* @apilevel low-level
* @ast method
*
*/
protected int numChildren() {
return 1;
}
/**
* @apilevel internal
* @ast method
*
*/
public boolean mayHaveRewrite() {
return false;
}
/**
* Replaces the Operand child.
* @param node The new node to replace the Operand child.
* @apilevel high-level
* @ast method
*
*/
public void setOperand(Expr node) {
setChild(node, 0);
}
/**
* Retrieves the Operand child.
* @return The current node used as the Operand child.
* @apilevel high-level
* @ast method
*
*/
public Expr getOperand() {
return (Expr)getChild(0);
}
/**
* Retrieves the Operand child.
* This method does not invoke AST transformations.
* @return The current node used as the Operand child.
* @apilevel low-level
* @ast method
*
*/
public Expr getOperandNoTransform() {
return (Expr)getChildNoTransform(0);
}
/**
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:45
* @apilevel internal
*/
public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) {
if(caller == getOperandNoTransform()) {
return true;
}
else { return getParent().Define_boolean_isDest(this, caller);
}
}
/**
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:53
* @apilevel internal
*/
public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) {
if(caller == getOperandNoTransform()) {
return true;
}
else { return getParent().Define_boolean_isIncOrDec(this, caller);
}
}
/**
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:98
* @apilevel internal
*/
public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) {
if(caller == getOperandNoTransform()) {
return NameType.EXPRESSION_NAME;
}
else { return getParent().Define_NameType_nameType(this, caller);
}
}
/**
* @apilevel internal
*/
public ASTNode rewriteTo() {
return super.rewriteTo();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy