soot.JastAddJ.LocalClassDeclStmt Maven / Gradle / Ivy
/* 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 LocalClassDeclStmt : {@link Stmt} ::= {@link ClassDecl};
* @ast node
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:223
*/
public class LocalClassDeclStmt extends Stmt implements Cloneable {
/**
* @apilevel low-level
*/
public void flushCache() {
super.flushCache();
isDAafter_Variable_values = null;
isDUafter_Variable_values = null;
canCompleteNormally_computed = false;
}
/**
* @apilevel internal
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/**
* @apilevel internal
*/
@SuppressWarnings({"unchecked", "cast"})
public LocalClassDeclStmt clone() throws CloneNotSupportedException {
LocalClassDeclStmt node = (LocalClassDeclStmt)super.clone();
node.isDAafter_Variable_values = null;
node.isDUafter_Variable_values = null;
node.canCompleteNormally_computed = false;
node.in$Circle(false);
node.is$Final(false);
return node;
}
/**
* @apilevel internal
*/
@SuppressWarnings({"unchecked", "cast"})
public LocalClassDeclStmt copy() {
try {
LocalClassDeclStmt node = (LocalClassDeclStmt) clone();
node.parent = null;
if(children != null)
node.children = (ASTNode[]) children.clone();
return node;
} catch (CloneNotSupportedException e) {
throw new Error("Error: clone not supported for " +
getClass().getName());
}
}
/**
* Create a deep copy of the AST subtree at this node.
* The copy is dangling, i.e. has no parent.
* @return dangling copy of the subtree at this node
* @apilevel low-level
*/
@SuppressWarnings({"unchecked", "cast"})
public LocalClassDeclStmt fullCopy() {
LocalClassDeclStmt tree = (LocalClassDeclStmt) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
ASTNode child = (ASTNode) children[i];
if(child != null) {
child = child.fullCopy();
tree.setChild(child, i);
}
}
}
return tree;
}
/**
* @ast method
* @aspect PrettyPrint
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:740
*/
public void toString(StringBuffer s) {
getClassDecl().toString(s);
}
/**
* @ast method
* @aspect Statements
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:534
*/
public void jimplify2(Body b) {
}
/**
* @ast method
*
*/
public LocalClassDeclStmt() {
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 LocalClassDeclStmt(ClassDecl 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 ClassDecl child.
* @param node The new node to replace the ClassDecl child.
* @apilevel high-level
* @ast method
*
*/
public void setClassDecl(ClassDecl node) {
setChild(node, 0);
}
/**
* Retrieves the ClassDecl child.
* @return The current node used as the ClassDecl child.
* @apilevel high-level
* @ast method
*
*/
public ClassDecl getClassDecl() {
return (ClassDecl)getChild(0);
}
/**
* Retrieves the ClassDecl child.
* This method does not invoke AST transformations.
* @return The current node used as the ClassDecl child.
* @apilevel low-level
* @ast method
*
*/
public ClassDecl getClassDeclNoTransform() {
return (ClassDecl)getChildNoTransform(0);
}
protected java.util.Map isDAafter_Variable_values;
/**
* @attribute syn
* @aspect DA
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:490
*/
@SuppressWarnings({"unchecked", "cast"})
public boolean isDAafter(Variable v) {
Object _parameters = v;
if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4);
if(isDAafter_Variable_values.containsKey(_parameters)) {
return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue();
}
ASTNode$State state = state();
int num = state.boundariesCrossed;
boolean isFinal = this.is$Final();
boolean isDAafter_Variable_value = isDAafter_compute(v);
if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value));
return isDAafter_Variable_value;
}
/**
* @apilevel internal
*/
private boolean isDAafter_compute(Variable v) { return isDAbefore(v); }
protected java.util.Map isDUafter_Variable_values;
/**
* @attribute syn
* @aspect DU
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:873
*/
@SuppressWarnings({"unchecked", "cast"})
public boolean isDUafter(Variable v) {
Object _parameters = v;
if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4);
if(isDUafter_Variable_values.containsKey(_parameters)) {
return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue();
}
ASTNode$State state = state();
int num = state.boundariesCrossed;
boolean isFinal = this.is$Final();
boolean isDUafter_Variable_value = isDUafter_compute(v);
if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value));
return isDUafter_Variable_value;
}
/**
* @apilevel internal
*/
private boolean isDUafter_compute(Variable v) { return isDUbefore(v); }
/**
* @apilevel internal
*/
protected boolean canCompleteNormally_computed = false;
/**
* @apilevel internal
*/
protected boolean canCompleteNormally_value;
/**
* @attribute syn
* @aspect UnreachableStatements
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:40
*/
@SuppressWarnings({"unchecked", "cast"})
public boolean canCompleteNormally() {
if(canCompleteNormally_computed) {
return canCompleteNormally_value;
}
ASTNode$State state = state();
int num = state.boundariesCrossed;
boolean isFinal = this.is$Final();
canCompleteNormally_value = canCompleteNormally_compute();
if(isFinal && num == state().boundariesCrossed) canCompleteNormally_computed = true;
return canCompleteNormally_value;
}
/**
* @apilevel internal
*/
private boolean canCompleteNormally_compute() { return reachable(); }
/**
* @attribute syn
* @aspect PreciseRethrow
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:55
*/
public boolean modifiedInScope(Variable var) {
ASTNode$State state = state();
try { return false; }
finally {
}
}
/**
* @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:543
* @apilevel internal
*/
public boolean Define_boolean_isLocalClass(ASTNode caller, ASTNode child) {
if(caller == getClassDeclNoTransform()) {
return true;
}
else { return getParent().Define_boolean_isLocalClass(this, caller);
}
}
/**
* @apilevel internal
*/
public ASTNode rewriteTo() {
return super.rewriteTo();
}
}