Package soot.JastAddJ
Class ASTNode<T extends ASTNode>
- java.lang.Object
-
- beaver.Symbol
-
- soot.JastAddJ.ASTNode<T>
-
- Direct Known Subclasses:
BodyDecl,CatchClause,CatchParameterDeclaration,CompilationUnit,Dims,ElementValue,ElementValuePair,Expr,IdUse,ImportDecl,List,Modifier,Modifiers,Opt,ParameterDeclaration,Program,Stmt,TypeDecl,VariableDecl
public class ASTNode<T extends ASTNode> extends Symbol implements Cloneable, Iterable<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected ASTNode[]childrenstatic booleangeneratedWithCacheCyclestatic booleangeneratedWithCircularEnabledstatic booleangeneratedWithComponentCheckbooleanin$Circlebooleanis$Finalprotected intnumChildrenprotected ASTNodeparentprotected static StringPRIMITIVE_PACKAGE_NAMEprotected static ASTNode$Statestate
-
Constructor Summary
Constructors Constructor Description ASTNode()
-
Method Summary
-
Methods inherited from class beaver.Symbol
getColumn, getEnd, getId, getLine, getStart, makePosition
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
PRIMITIVE_PACKAGE_NAME
protected static final String PRIMITIVE_PACKAGE_NAME
- See Also:
- Constant Field Values
-
generatedWithCircularEnabled
public static final boolean generatedWithCircularEnabled
- See Also:
- Constant Field Values
-
generatedWithCacheCycle
public static final boolean generatedWithCacheCycle
- See Also:
- Constant Field Values
-
generatedWithComponentCheck
public static final boolean generatedWithComponentCheck
- See Also:
- Constant Field Values
-
state
protected static ASTNode$State state
-
in$Circle
public boolean in$Circle
-
is$Final
public boolean is$Final
-
numChildren
protected int numChildren
-
parent
protected ASTNode parent
-
children
protected ASTNode[] children
-
-
Method Detail
-
flushCache
public void flushCache()
-
flushCollectionCache
public void flushCollectionCache()
-
clone
public ASTNode<T> clone() throws CloneNotSupportedException
- Overrides:
clonein classSymbol- Throws:
CloneNotSupportedException
-
fullCopy
public ASTNode<T> fullCopy()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.- Returns:
- dangling copy of the subtree at this node
-
accessControl
public void accessControl()
-
collectExceptions
protected void collectExceptions(Collection c, ASTNode target)
-
collectBranches
public void collectBranches(Collection c)
-
varChildIndex
public int varChildIndex(Block b)
-
varChildIndex
public int varChildIndex(TypeDecl t)
-
definiteAssignment
public void definiteAssignment()
-
checkDUeverywhere
protected boolean checkDUeverywhere(Variable v)
-
isDescendantTo
protected boolean isDescendantTo(ASTNode node)
-
sourceFile
protected String sourceFile()
-
setStart
public ASTNode setStart(int i)
-
start
public int start()
-
setEnd
public ASTNode setEnd(int i)
-
end
public int end()
-
location
public String location()
-
errorPrefix
public String errorPrefix()
-
warningPrefix
public String warningPrefix()
-
error
public void error(String s)
-
warning
public void warning(String s)
-
exceptionHandling
public void exceptionHandling()
-
reachedException
protected boolean reachedException(TypeDecl type)
-
removeInstanceMethods
public static Collection removeInstanceMethods(Collection c)
-
putSimpleSetElement
protected static void putSimpleSetElement(HashMap map, Object key, Object value)
-
nameCheck
public void nameCheck()
-
options
public Options options()
-
toString
public void toString(StringBuffer s)
-
dumpTree
public String dumpTree()
-
dumpTree
public void dumpTree(StringBuffer s, int j)
-
dumpTreeNoRewrite
public String dumpTreeNoRewrite()
-
dumpTreeNoRewrite
protected void dumpTreeNoRewrite(StringBuffer s, int indent)
-
typeCheck
public void typeCheck()
-
clearLocations
public void clearLocations()
-
transformEnumConstructors
protected void transformEnumConstructors()
-
checkEnum
protected void checkEnum(EnumDecl enumDecl)
-
flushCaches
public void flushCaches()
-
transformation
public void transformation()
-
jimplify1phase1
public void jimplify1phase1()
-
jimplify1phase2
public void jimplify1phase2()
-
jimplify2
public void jimplify2()
-
jimplify2
public void jimplify2(Body b)
-
newLabel
protected Stmt newLabel()
-
addAttributes
public void addAttributes()
-
cloneSubtree
public ASTNode cloneSubtree()
Create a deep copy of this subtree. The copy is dangling, i.e. has no parent.- Returns:
- a dangling copy of the subtree at this node
-
checkWarnings
public void checkWarnings()
Checking of the SafeVarargs annotation is only needed for method declarations.
-
collectTypesToHierarchy
public void collectTypesToHierarchy(Collection<Type> set)
-
collectTypesToSignatures
public void collectTypesToSignatures(Collection<Type> set)
-
init$Children
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
-
state
public final ASTNode$State state()
-
in$Circle
public boolean in$Circle()
-
in$Circle
public void in$Circle(boolean b)
-
is$Final
public boolean is$Final()
-
is$Final
public void is$Final(boolean b)
-
getChild
public T getChild(int i)
-
getIndexOfChild
public int getIndexOfChild(ASTNode node)
-
addChild
public void addChild(T node)
-
getChildNoTransform
public final T getChildNoTransform(int i)
This method does not invoke AST transformations.
-
numChildren
protected int numChildren()
-
getNumChild
public int getNumChild()
-
getNumChildNoTransform
public final int getNumChildNoTransform()
This method does not invoke AST transformations.
-
setChild
public void setChild(ASTNode node, int i)
-
insertChild
public void insertChild(ASTNode node, int i)
-
removeChild
public void removeChild(int i)
-
getParent
public ASTNode getParent()
-
setParent
public void setParent(ASTNode node)
-
duringImplicitConstructor
protected boolean duringImplicitConstructor()
-
duringBoundNames
protected boolean duringBoundNames()
-
duringNameResolution
protected boolean duringNameResolution()
-
duringSyntacticClassification
protected boolean duringSyntacticClassification()
-
duringAnonymousClasses
protected boolean duringAnonymousClasses()
-
duringVariableDeclarationTransformation
protected boolean duringVariableDeclarationTransformation()
-
duringLiterals
protected boolean duringLiterals()
-
duringDU
protected boolean duringDU()
-
duringAnnotations
protected boolean duringAnnotations()
-
duringEnums
protected boolean duringEnums()
-
duringGenericTypeVariables
protected boolean duringGenericTypeVariables()
-
mayHaveRewrite
public boolean mayHaveRewrite()
-
collectErrors
public void collectErrors()
The collectErrors method is refined so that it calls the checkWarnings method on each ASTNode to report unchecked warnings.
-
lineNumber
public int lineNumber()
-
indent
public String indent()
-
extractIndent
public String extractIndent()
-
addsIndentationLevel
public boolean addsIndentationLevel()
-
dumpString
public String dumpString()
-
usesTypeVariable
public boolean usesTypeVariable()
-
isStringAdd
public boolean isStringAdd()
-
definesLabel
public boolean definesLabel()
-
compilationUnit
public CompilationUnit compilationUnit()
Fetches the immediately enclosing compilation unit.
-
rewriteTo
public ASTNode rewriteTo()
-
Define_ConstructorDecl_constructorDecl
public ConstructorDecl Define_ConstructorDecl_constructorDecl(ASTNode caller, ASTNode child)
-
Define_TypeDecl_componentType
public TypeDecl Define_TypeDecl_componentType(ASTNode caller, ASTNode child)
-
Define_LabeledStmt_lookupLabel
public LabeledStmt Define_LabeledStmt_lookupLabel(ASTNode caller, ASTNode child, String name)
-
Define_boolean_isDAbefore
public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v)
-
Define_boolean_isDUbefore
public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v)
-
Define_TypeDecl_typeException
public TypeDecl Define_TypeDecl_typeException(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeRuntimeException
public TypeDecl Define_TypeDecl_typeRuntimeException(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeNullPointerException
public TypeDecl Define_TypeDecl_typeNullPointerException(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeThrowable
public TypeDecl Define_TypeDecl_typeThrowable(ASTNode caller, ASTNode child)
-
Define_boolean_handlesException
public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType)
-
Define_Collection_lookupConstructor
public Collection Define_Collection_lookupConstructor(ASTNode caller, ASTNode child)
-
Define_Collection_lookupSuperConstructor
public Collection Define_Collection_lookupSuperConstructor(ASTNode caller, ASTNode child)
-
Define_Collection_lookupMethod
public Collection Define_Collection_lookupMethod(ASTNode caller, ASTNode child, String name)
-
Define_TypeDecl_typeObject
public TypeDecl Define_TypeDecl_typeObject(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeCloneable
public TypeDecl Define_TypeDecl_typeCloneable(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeSerializable
public TypeDecl Define_TypeDecl_typeSerializable(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeBoolean
public TypeDecl Define_TypeDecl_typeBoolean(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeDouble
public TypeDecl Define_TypeDecl_typeDouble(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeString
public TypeDecl Define_TypeDecl_typeString(ASTNode caller, ASTNode child)
-
Define_TypeDecl_unknownType
public TypeDecl Define_TypeDecl_unknownType(ASTNode caller, ASTNode child)
-
Define_boolean_hasPackage
public boolean Define_boolean_hasPackage(ASTNode caller, ASTNode child, String packageName)
-
Define_TypeDecl_lookupType
public TypeDecl Define_TypeDecl_lookupType(ASTNode caller, ASTNode child, String packageName, String typeName)
-
Define_SimpleSet_lookupType
public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name)
-
Define_SimpleSet_lookupVariable
public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name)
-
Define_boolean_mayBePublic
public boolean Define_boolean_mayBePublic(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeProtected
public boolean Define_boolean_mayBeProtected(ASTNode caller, ASTNode child)
-
Define_boolean_mayBePrivate
public boolean Define_boolean_mayBePrivate(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeStatic
public boolean Define_boolean_mayBeStatic(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeAbstract
public boolean Define_boolean_mayBeAbstract(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeVolatile
public boolean Define_boolean_mayBeVolatile(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeTransient
public boolean Define_boolean_mayBeTransient(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeStrictfp
public boolean Define_boolean_mayBeStrictfp(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeSynchronized
public boolean Define_boolean_mayBeSynchronized(ASTNode caller, ASTNode child)
-
Define_boolean_mayBeNative
public boolean Define_boolean_mayBeNative(ASTNode caller, ASTNode child)
-
Define_ASTNode_enclosingBlock
public ASTNode Define_ASTNode_enclosingBlock(ASTNode caller, ASTNode child)
-
Define_VariableScope_outerScope
public VariableScope Define_VariableScope_outerScope(ASTNode caller, ASTNode child)
-
Define_boolean_insideSwitch
public boolean Define_boolean_insideSwitch(ASTNode caller, ASTNode child)
-
Define_String_typeDeclIndent
public String Define_String_typeDeclIndent(ASTNode caller, ASTNode child)
-
Define_boolean_isAnonymous
public boolean Define_boolean_isAnonymous(ASTNode caller, ASTNode child)
-
Define_Variable_unknownField
public Variable Define_Variable_unknownField(ASTNode caller, ASTNode child)
-
Define_MethodDecl_unknownMethod
public MethodDecl Define_MethodDecl_unknownMethod(ASTNode caller, ASTNode child)
-
Define_ConstructorDecl_unknownConstructor
public ConstructorDecl Define_ConstructorDecl_unknownConstructor(ASTNode caller, ASTNode child)
-
Define_BodyDecl_enclosingBodyDecl
public BodyDecl Define_BodyDecl_enclosingBodyDecl(ASTNode caller, ASTNode child)
-
Define_boolean_isMemberType
public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child)
-
Define_TypeDecl_switchType
public TypeDecl Define_TypeDecl_switchType(ASTNode caller, ASTNode child)
-
Define_TypeDecl_returnType
public TypeDecl Define_TypeDecl_returnType(ASTNode caller, ASTNode child)
-
Define_TypeDecl_enclosingInstance
public TypeDecl Define_TypeDecl_enclosingInstance(ASTNode caller, ASTNode child)
-
Define_boolean_inExplicitConstructorInvocation
public boolean Define_boolean_inExplicitConstructorInvocation(ASTNode caller, ASTNode child)
-
Define_boolean_inStaticContext
public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child)
-
Define_boolean_reportUnreachable
public boolean Define_boolean_reportUnreachable(ASTNode caller, ASTNode child)
-
Define_boolean_isMethodParameter
public boolean Define_boolean_isMethodParameter(ASTNode caller, ASTNode child)
-
Define_boolean_isConstructorParameter
public boolean Define_boolean_isConstructorParameter(ASTNode caller, ASTNode child)
-
Define_boolean_isExceptionHandlerParameter
public boolean Define_boolean_isExceptionHandlerParameter(ASTNode caller, ASTNode child)
-
Define_boolean_mayUseAnnotationTarget
public boolean Define_boolean_mayUseAnnotationTarget(ASTNode caller, ASTNode child, String name)
-
Define_ElementValue_lookupElementTypeValue
public ElementValue Define_ElementValue_lookupElementTypeValue(ASTNode caller, ASTNode child, String name)
-
Define_boolean_withinSuppressWarnings
public boolean Define_boolean_withinSuppressWarnings(ASTNode caller, ASTNode child, String s)
-
Define_boolean_withinDeprecatedAnnotation
public boolean Define_boolean_withinDeprecatedAnnotation(ASTNode caller, ASTNode child)
-
Define_Annotation_lookupAnnotation
public Annotation Define_Annotation_lookupAnnotation(ASTNode caller, ASTNode child, TypeDecl typeDecl)
-
Define_TypeDecl_enclosingAnnotationDecl
public TypeDecl Define_TypeDecl_enclosingAnnotationDecl(ASTNode caller, ASTNode child)
-
Define_TypeDecl_assignConvertedType
public TypeDecl Define_TypeDecl_assignConvertedType(ASTNode caller, ASTNode child)
-
Define_boolean_inExtendsOrImplements
public boolean Define_boolean_inExtendsOrImplements(ASTNode caller, ASTNode child)
-
Define_TypeDecl_typeWildcard
public TypeDecl Define_TypeDecl_typeWildcard(ASTNode caller, ASTNode child)
-
Define_TypeDecl_lookupWildcardExtends
public TypeDecl Define_TypeDecl_lookupWildcardExtends(ASTNode caller, ASTNode child, TypeDecl typeDecl)
-
Define_TypeDecl_lookupWildcardSuper
public TypeDecl Define_TypeDecl_lookupWildcardSuper(ASTNode caller, ASTNode child, TypeDecl typeDecl)
-
Define_LUBType_lookupLUBType
public LUBType Define_LUBType_lookupLUBType(ASTNode caller, ASTNode child, Collection bounds)
-
Define_GLBType_lookupGLBType
public GLBType Define_GLBType_lookupGLBType(ASTNode caller, ASTNode child, ArrayList bounds)
-
Define_TypeDecl_genericDecl
public TypeDecl Define_TypeDecl_genericDecl(ASTNode caller, ASTNode child)
-
Define_boolean_variableArityValid
public boolean Define_boolean_variableArityValid(ASTNode caller, ASTNode child)
-
Define_TypeDecl_expectedType
public TypeDecl Define_TypeDecl_expectedType(ASTNode caller, ASTNode child)
-
Define_soot_jimple_Stmt_condition_false_label
public Stmt Define_soot_jimple_Stmt_condition_false_label(ASTNode caller, ASTNode child)
-
Define_soot_jimple_Stmt_condition_true_label
public Stmt Define_soot_jimple_Stmt_condition_true_label(ASTNode caller, ASTNode child)
-
Define_boolean_enclosedByExceptionHandler
public boolean Define_boolean_enclosedByExceptionHandler(ASTNode caller, ASTNode child)
-
Define_ArrayList_exceptionRanges
public ArrayList Define_ArrayList_exceptionRanges(ASTNode caller, ASTNode child)
-
Define_boolean_isCatchParam
public boolean Define_boolean_isCatchParam(ASTNode caller, ASTNode child)
-
Define_CatchClause_catchClause
public CatchClause Define_CatchClause_catchClause(ASTNode caller, ASTNode child)
-
Define_boolean_resourcePreviouslyDeclared
public boolean Define_boolean_resourcePreviouslyDeclared(ASTNode caller, ASTNode child, String name)
-
Define_ClassInstanceExpr_getClassInstanceExpr
public ClassInstanceExpr Define_ClassInstanceExpr_getClassInstanceExpr(ASTNode caller, ASTNode child)
-
Define_boolean_isAnonymousDecl
public boolean Define_boolean_isAnonymousDecl(ASTNode caller, ASTNode child)
-
Define_boolean_isExplicitGenericConstructorAccess
public boolean Define_boolean_isExplicitGenericConstructorAccess(ASTNode caller, ASTNode child)
-
Define_CompilationUnit_compilationUnit
public CompilationUnit Define_CompilationUnit_compilationUnit(ASTNode caller, ASTNode child)
-
Define_SimpleSet_allImportedTypes
public SimpleSet Define_SimpleSet_allImportedTypes(ASTNode caller, ASTNode child, String name)
-
Define_TypeDecl_enclosingType
public TypeDecl Define_TypeDecl_enclosingType(ASTNode caller, ASTNode child)
-
Define_boolean_isNestedType
public boolean Define_boolean_isNestedType(ASTNode caller, ASTNode child)
-
Define_boolean_isLocalClass
public boolean Define_boolean_isLocalClass(ASTNode caller, ASTNode child)
-
Define_boolean_inhModifiedInScope
public boolean Define_boolean_inhModifiedInScope(ASTNode caller, ASTNode child, Variable var)
-
Define_boolean_reachableCatchClause
public boolean Define_boolean_reachableCatchClause(ASTNode caller, ASTNode child, TypeDecl exceptionType)
-
Define_Collection_TypeDecl__caughtExceptions
public Collection<TypeDecl> Define_Collection_TypeDecl__caughtExceptions(ASTNode caller, ASTNode child)
-
-