Package soot.JastAddJ

Class ASTNode<T extends ASTNode>

    • Field Detail

      • 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
      • in$Circle

        public boolean in$Circle
      • is$Final

        public boolean is$Final
      • numChildren

        protected int numChildren
      • children

        protected ASTNode[] children
    • Constructor Detail

      • ASTNode

        public ASTNode()
    • Method Detail

      • flushCache

        public void flushCache()
      • flushCollectionCache

        public void flushCollectionCache()
      • 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)
      • branchTarget

        public Stmt branchTarget​(Stmt branchStmt)
      • collectFinally

        public void collectFinally​(Stmt branchStmt,
                                   ArrayList list)
      • 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)
      • putSimpleSetElement

        protected static void putSimpleSetElement​(HashMap map,
                                                  Object key,
                                                  Object value)
      • removeInstanceVariables

        public SimpleSet removeInstanceVariables​(SimpleSet oldSet)
      • nameCheck

        public void nameCheck()
      • options

        public Options options()
      • 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()
      • collectEnclosingVariables

        public void collectEnclosingVariables​(HashSet set,
                                              TypeDecl typeDecl)
      • 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()
      • emitConstant

        public static Value emitConstant​(Constant constant)
      • endExceptionRange

        public void endExceptionRange​(Body b,
                                      ArrayList list)
      • beginExceptionRange

        public void beginExceptionRange​(Body b,
                                        ArrayList list)
      • 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
      • checkUncheckedConversion

        public void checkUncheckedConversion​(TypeDecl source,
                                             TypeDecl dest)
      • 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.
      • 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.
      • unassignedEverywhere

        public boolean unassignedEverywhere​(Variable v,
                                            TryStmt stmt)
      • 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_TypeDecl_componentType

        public TypeDecl Define_TypeDecl_componentType​(ASTNode caller,
                                                      ASTNode child)
      • Define_boolean_isDest

        public boolean Define_boolean_isDest​(ASTNode caller,
                                             ASTNode child)
      • Define_boolean_isSource

        public boolean Define_boolean_isSource​(ASTNode caller,
                                               ASTNode child)
      • Define_boolean_isIncOrDec

        public boolean Define_boolean_isIncOrDec​(ASTNode caller,
                                                 ASTNode child)
      • 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_Expr_nestedScope

        public Expr Define_Expr_nestedScope​(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_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_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_mayBeFinal

        public boolean Define_boolean_mayBeFinal​(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_boolean_insideLoop

        public boolean Define_boolean_insideLoop​(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_enclosingInstance

        public TypeDecl Define_TypeDecl_enclosingInstance​(ASTNode caller,
                                                          ASTNode child)
      • Define_String_methodHost

        public String Define_String_methodHost​(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_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_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_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_int_localNum

        public int Define_int_localNum​(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_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_String_packageName

        public String Define_String_packageName​(ASTNode caller,
                                                ASTNode child)
      • 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_String_hostPackage

        public String Define_String_hostPackage​(ASTNode caller,
                                                ASTNode child)
      • Define_boolean_reachable

        public boolean Define_boolean_reachable​(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)