Package soot.JastAddJ

Class MethodDecl

    • Field Detail

      • tokenString_ID

        protected String tokenString_ID
      • IDstart

        public int IDstart
      • IDend

        public int IDend
      • accessibleFrom_TypeDecl_values

        protected Map accessibleFrom_TypeDecl_values
      • throwsException_TypeDecl_values

        protected Map throwsException_TypeDecl_values
      • signature_computed

        protected boolean signature_computed
      • signature_value

        protected String signature_value
      • moreSpecificThan_MethodDecl_values

        protected Map moreSpecificThan_MethodDecl_values
      • overrides_MethodDecl_values

        protected Map overrides_MethodDecl_values
      • hides_MethodDecl_values

        protected Map hides_MethodDecl_values
      • parameterDeclaration_String_values

        protected Map parameterDeclaration_String_values
      • type_computed

        protected boolean type_computed
      • type_value

        protected TypeDecl type_value
      • usesTypeVariable_computed

        protected boolean usesTypeVariable_computed
      • usesTypeVariable_value

        protected boolean usesTypeVariable_value
      • sourceMethodDecl_computed

        protected boolean sourceMethodDecl_computed
      • sourceMethodDecl_value

        protected MethodDecl sourceMethodDecl_value
      • sootMethod_computed

        protected boolean sootMethod_computed
      • sootMethod_value

        protected SootMethod sootMethod_value
      • sootRef_computed

        protected boolean sootRef_computed
      • offsetBeforeParameters_computed

        protected boolean offsetBeforeParameters_computed
      • offsetBeforeParameters_value

        protected int offsetBeforeParameters_value
      • offsetAfterParameters_computed

        protected boolean offsetAfterParameters_computed
      • offsetAfterParameters_value

        protected int offsetAfterParameters_value
      • handlesException_TypeDecl_values

        protected Map handlesException_TypeDecl_values
    • Method Detail

      • fullCopy

        public MethodDecl 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
      • createBoundAccess

        public Access createBoundAccess​(List args)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator
      • createSuperAccessor

        public MethodDecl createSuperAccessor​(TypeDecl methodQualifier)
      • addRuntimeVisibleParameterAnnotationsAttribute

        public void addRuntimeVisibleParameterAnnotationsAttribute​(Collection c)
      • addRuntimeInvisibleParameterAnnotationsAttribute

        public void addRuntimeInvisibleParameterAnnotationsAttribute​(Collection c)
      • addSourceLevelParameterAnnotationsAttribute

        public void addSourceLevelParameterAnnotationsAttribute​(Collection c)
      • checkWarnings

        public void checkWarnings()
        Check if the method is missing a SafeVarargs annotation.
        Overrides:
        checkWarnings in class BodyDecl
      • 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 MemberDecl
      • setModifiers

        public void setModifiers​(Modifiers node)
        Replaces the Modifiers child.
        Parameters:
        node - The new node to replace the Modifiers child.
      • getModifiers

        public Modifiers getModifiers()
        Retrieves the Modifiers child.
        Returns:
        The current node used as the Modifiers child.
      • getModifiersNoTransform

        public Modifiers getModifiersNoTransform()
        Retrieves the Modifiers child.

        This method does not invoke AST transformations.

        Returns:
        The current node used as the Modifiers child.
      • setTypeAccess

        public void setTypeAccess​(Access node)
        Replaces the TypeAccess child.
        Parameters:
        node - The new node to replace the TypeAccess child.
      • getTypeAccess

        public Access getTypeAccess()
        Retrieves the TypeAccess child.
        Returns:
        The current node used as the TypeAccess child.
      • getTypeAccessNoTransform

        public Access getTypeAccessNoTransform()
        Retrieves the TypeAccess child.

        This method does not invoke AST transformations.

        Returns:
        The current node used as the TypeAccess child.
      • setID

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

        public void setID​(Symbol symbol)
        JastAdd-internal setter for lexeme ID using the Beaver parser.
      • getID

        public String getID()
        Retrieves the value for the lexeme ID.
        Returns:
        The value for the lexeme ID.
      • setParameterList

        public void setParameterList​(List<ParameterDeclaration> list)
        Replaces the Parameter list.
        Parameters:
        list - The new list node to be used as the Parameter list.
      • getNumParameter

        public int getNumParameter()
        Retrieves the number of children in the Parameter list.
        Returns:
        Number of children in the Parameter list.
      • getNumParameterNoTransform

        public int getNumParameterNoTransform()
        Retrieves the number of children in the Parameter list. Calling this method will not trigger rewrites..
        Returns:
        Number of children in the Parameter list.
      • getParameter

        public ParameterDeclaration getParameter​(int i)
        Retrieves the element at index i in the Parameter list..
        Parameters:
        i - Index of the element to return.
        Returns:
        The element at position i in the Parameter list.
      • addParameter

        public void addParameter​(ParameterDeclaration node)
        Append an element to the Parameter list.
        Parameters:
        node - The element to append to the Parameter list.
      • setParameter

        public void setParameter​(ParameterDeclaration node,
                                 int i)
        Replaces the Parameter 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.
      • getParameters

        public List<ParameterDeclaration> getParameters()
        Retrieves the Parameter list.
        Returns:
        The node representing the Parameter list.
      • getParametersNoTransform

        public List<ParameterDeclaration> getParametersNoTransform()
        Retrieves the Parameter list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the Parameter list.
      • getParameterList

        public List<ParameterDeclaration> getParameterList()
        Retrieves the Parameter list.
        Returns:
        The node representing the Parameter list.
      • getParameterListNoTransform

        public List<ParameterDeclaration> getParameterListNoTransform()
        Retrieves the Parameter list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the Parameter list.
      • setExceptionList

        public void setExceptionList​(List<Access> list)
        Replaces the Exception list.
        Parameters:
        list - The new list node to be used as the Exception list.
      • getNumException

        public int getNumException()
        Retrieves the number of children in the Exception list.
        Returns:
        Number of children in the Exception list.
      • getNumExceptionNoTransform

        public int getNumExceptionNoTransform()
        Retrieves the number of children in the Exception list. Calling this method will not trigger rewrites..
        Returns:
        Number of children in the Exception list.
      • getException

        public Access getException​(int i)
        Retrieves the element at index i in the Exception list..
        Parameters:
        i - Index of the element to return.
        Returns:
        The element at position i in the Exception list.
      • addException

        public void addException​(Access node)
        Append an element to the Exception list.
        Parameters:
        node - The element to append to the Exception list.
      • addExceptionNoTransform

        public void addExceptionNoTransform​(Access node)
      • setException

        public void setException​(Access node,
                                 int i)
        Replaces the Exception 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.
      • getExceptions

        public List<Access> getExceptions()
        Retrieves the Exception list.
        Returns:
        The node representing the Exception list.
      • getExceptionsNoTransform

        public List<Access> getExceptionsNoTransform()
        Retrieves the Exception list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the Exception list.
      • getExceptionList

        public List<Access> getExceptionList()
        Retrieves the Exception list.
        Returns:
        The node representing the Exception list.
      • getExceptionListNoTransform

        public List<Access> getExceptionListNoTransform()
        Retrieves the Exception list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the Exception list.
      • setBlockOpt

        public void setBlockOpt​(Opt<Block> opt)
        Replaces the optional node for the Block child. This is the Opt node containing the child Block, not the actual child!
        Parameters:
        opt - The new node to be used as the optional node for the Block child.
      • hasBlock

        public boolean hasBlock()
        Check whether the optional Block child exists.
        Returns:
        true if the optional Block child exists, false if it does not.
      • getBlock

        public Block getBlock()
        Retrieves the (optional) Block child.
        Returns:
        The Block child, if it exists. Returns null otherwise.
      • setBlock

        public void setBlock​(Block node)
        Replaces the (optional) Block child.
        Parameters:
        node - The new node to be used as the Block child.
      • getBlockOpt

        public Opt<Block> getBlockOpt()
      • getBlockOptNoTransform

        public Opt<Block> getBlockOptNoTransform()
        Retrieves the optional node for child Block. This is the Opt node containing the child Block, not the actual child!

        This method does not invoke AST transformations.

        Returns:
        The optional node for child Block.
      • accessibleFrom

        public boolean accessibleFrom​(TypeDecl type)
      • size

        public int size()
        Specified by:
        size in interface SimpleSet
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface SimpleSet
      • throwsException

        public boolean throwsException​(TypeDecl exceptionType)
      • signature

        public String signature()
      • sameSignature

        public boolean sameSignature​(MethodDecl m)
      • moreSpecificThan

        public boolean moreSpecificThan​(MethodDecl m)
      • overrides

        public boolean overrides​(MethodDecl m)
      • parameterDeclaration

        public SimpleSet parameterDeclaration​(String name)
      • isPublic

        public boolean isPublic()
      • isPrivate

        public boolean isPrivate()
      • isProtected

        public boolean isProtected()
      • isAbstract

        public boolean isAbstract()
      • isFinal

        public boolean isFinal()
      • isSynchronized

        public boolean isSynchronized()
      • isNative

        public boolean isNative()
      • isStrictfp

        public boolean isStrictfp()
      • isVoid

        public boolean isVoid()
        Overrides:
        isVoid in class BodyDecl
      • mayOverrideReturn

        public boolean mayOverrideReturn​(MethodDecl m)
      • annotationMethodOverride

        public boolean annotationMethodOverride()
      • sourceMethodDecl

        public MethodDecl sourceMethodDecl()
      • arity

        public int arity()
      • isVariableArity

        public boolean isVariableArity()
      • sootTypeModifiers

        public int sootTypeModifiers()
      • offsetBeforeParameters

        public int offsetBeforeParameters()
      • offsetAfterParameters

        public int offsetAfterParameters()
      • hasAnnotationSafeVarargs

        public boolean hasAnnotationSafeVarargs()
        Overrides:
        hasAnnotationSafeVarargs in class BodyDecl
        Returns:
        true if the modifier list includes the SafeVarargs annotation
      • hasIllegalAnnotationSafeVarargs

        public boolean hasIllegalAnnotationSafeVarargs()
        It is an error if the SafeVarargs annotation is used on something that is not a variable arity method or constructor.
        Overrides:
        hasIllegalAnnotationSafeVarargs in class BodyDecl
      • suppressWarnings

        public boolean suppressWarnings​(String type)
      • handlesException

        public boolean handlesException​(TypeDecl exceptionType)
      • unknownMethod

        public MethodDecl unknownMethod()
      • typeObject

        public TypeDecl typeObject()
      • withinSuppressWarnings

        public boolean withinSuppressWarnings​(String s)