Package soot.JastAddJ

Class CompilationUnit

    • Field Detail

      • isResolved

        public boolean isResolved
      • tokenjava_lang_String_PackageDecl

        protected String tokenjava_lang_String_PackageDecl
      • PackageDeclstart

        public int PackageDeclstart
      • PackageDeclend

        public int PackageDeclend
      • packageName_computed

        protected boolean packageName_computed
      • packageName_value

        protected String packageName_value
      • lookupType_String_values

        protected Map lookupType_String_values
    • Method Detail

      • fullCopy

        public CompilationUnit fullCopy()
        Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
        Overrides:
        fullCopy in class ASTNode<ASTNode>
        Returns:
        dangling copy of the subtree at this node
      • setRelativeName

        public void setRelativeName​(String name)
      • setPathName

        public void setPathName​(String name)
      • setFromSource

        public void setFromSource​(boolean value)
      • addParseError

        public void addParseError​(Problem msg)
      • errorCheck

        public void errorCheck​(Collection collection)
      • refined_NameCheck_CompilationUnit_nameCheck

        public void refined_NameCheck_CompilationUnit_nameCheck()
      • init$Children

        public void init$Children()
        Initializes the child array to the correct size. Initializes List and Opt nta children.
        Overrides:
        init$Children in class ASTNode<ASTNode>
      • setPackageDecl

        public void setPackageDecl​(String value)
        Replaces the lexeme PackageDecl.
        Parameters:
        value - The new value for the lexeme PackageDecl.
      • setPackageDecl

        public void setPackageDecl​(Symbol symbol)
        JastAdd-internal setter for lexeme PackageDecl using the Beaver parser.
      • getPackageDecl

        public String getPackageDecl()
        Retrieves the value for the lexeme PackageDecl.
        Returns:
        The value for the lexeme PackageDecl.
      • setImportDeclList

        public void setImportDeclList​(List<ImportDecl> list)
        Replaces the ImportDecl list.
        Parameters:
        list - The new list node to be used as the ImportDecl list.
      • getNumImportDecl

        public int getNumImportDecl()
        Retrieves the number of children in the ImportDecl list.
        Returns:
        Number of children in the ImportDecl list.
      • getNumImportDeclNoTransform

        public int getNumImportDeclNoTransform()
        Retrieves the number of children in the ImportDecl list. Calling this method will not trigger rewrites..
        Returns:
        Number of children in the ImportDecl list.
      • getImportDecl

        public ImportDecl getImportDecl​(int i)
        Retrieves the element at index i in the ImportDecl list..
        Parameters:
        i - Index of the element to return.
        Returns:
        The element at position i in the ImportDecl list.
      • addImportDecl

        public void addImportDecl​(ImportDecl node)
        Append an element to the ImportDecl list.
        Parameters:
        node - The element to append to the ImportDecl list.
      • addImportDeclNoTransform

        public void addImportDeclNoTransform​(ImportDecl node)
      • setImportDecl

        public void setImportDecl​(ImportDecl node,
                                  int i)
        Replaces the ImportDecl list element at index i with the new node node.
        Parameters:
        node - The new node to replace the old list element.
        i - The list index of the node to be replaced.
      • getImportDecls

        public List<ImportDecl> getImportDecls()
        Retrieves the ImportDecl list.
        Returns:
        The node representing the ImportDecl list.
      • getImportDeclsNoTransform

        public List<ImportDecl> getImportDeclsNoTransform()
        Retrieves the ImportDecl list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the ImportDecl list.
      • getImportDeclList

        public List<ImportDecl> getImportDeclList()
        Retrieves the ImportDecl list.
        Returns:
        The node representing the ImportDecl list.
      • getImportDeclListNoTransform

        public List<ImportDecl> getImportDeclListNoTransform()
        Retrieves the ImportDecl list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the ImportDecl list.
      • setTypeDeclList

        public void setTypeDeclList​(List<TypeDecl> list)
        Replaces the TypeDecl list.
        Parameters:
        list - The new list node to be used as the TypeDecl list.
      • getNumTypeDecl

        public int getNumTypeDecl()
        Retrieves the number of children in the TypeDecl list.
        Returns:
        Number of children in the TypeDecl list.
      • getNumTypeDeclNoTransform

        public int getNumTypeDeclNoTransform()
        Retrieves the number of children in the TypeDecl list. Calling this method will not trigger rewrites..
        Returns:
        Number of children in the TypeDecl list.
      • getTypeDecl

        public TypeDecl getTypeDecl​(int i)
        Retrieves the element at index i in the TypeDecl list..
        Parameters:
        i - Index of the element to return.
        Returns:
        The element at position i in the TypeDecl list.
      • addTypeDecl

        public void addTypeDecl​(TypeDecl node)
        Append an element to the TypeDecl list.
        Parameters:
        node - The element to append to the TypeDecl list.
      • addTypeDeclNoTransform

        public void addTypeDeclNoTransform​(TypeDecl node)
      • setTypeDecl

        public void setTypeDecl​(TypeDecl node,
                                int i)
        Replaces the TypeDecl list element at index i with the new node node.
        Parameters:
        node - The new node to replace the old list element.
        i - The list index of the node to be replaced.
      • getTypeDecls

        public List<TypeDecl> getTypeDecls()
        Retrieves the TypeDecl list.
        Returns:
        The node representing the TypeDecl list.
      • getTypeDeclsNoTransform

        public List<TypeDecl> getTypeDeclsNoTransform()
        Retrieves the TypeDecl list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the TypeDecl list.
      • getTypeDeclList

        public List<TypeDecl> getTypeDeclList()
        Retrieves the TypeDecl list.
        Returns:
        The node representing the TypeDecl list.
      • getTypeDeclListNoTransform

        public List<TypeDecl> getTypeDeclListNoTransform()
        Retrieves the TypeDecl list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the TypeDecl list.
      • relativeName

        public String relativeName()
      • pathName

        public String pathName()
      • fromSource

        public boolean fromSource()
      • importedTypesOnDemand

        public SimpleSet importedTypesOnDemand​(String name)
      • packageName

        public String packageName()
      • importedFieldsOnDemand

        public SimpleSet importedFieldsOnDemand​(String name)
      • importedMethodsOnDemand

        public Collection importedMethodsOnDemand​(String name)