Package soot.JastAddJ

Class DiamondAccess

    • Field Detail

      • type_computed

        protected boolean type_computed
      • type_value

        protected TypeDecl type_value
      • typeArguments_MethodDecl_values

        protected Map typeArguments_MethodDecl_values
    • Constructor Detail

      • DiamondAccess

        public DiamondAccess()
      • DiamondAccess

        public DiamondAccess​(Access p0)
    • Method Detail

      • fullCopy

        public DiamondAccess 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
      • chooseConstructor

        protected SimpleSet chooseConstructor()
        Choose a constructor for the diamond operator using placeholder methods.
      • potentiallyApplicable

        protected Collection<MethodDecl> potentiallyApplicable​(List<PlaceholderMethodDecl> candidates)
        Select potentially applicable method declarations from a set of candidates. Type inference is applied to the (potentially) applicable candidates.
      • potentiallyApplicable

        protected boolean potentiallyApplicable​(GenericMethodDecl candidate)
        Returns:
        false if the candidate method is not applicable.
      • applicableBySubtyping

        protected boolean applicableBySubtyping​(ClassInstanceExpr expr,
                                                MethodDecl method)
        Returns:
        true if the method is applicable by subtyping
      • applicableByMethodInvocationConversion

        protected boolean applicableByMethodInvocationConversion​(ClassInstanceExpr expr,
                                                                 MethodDecl method)
        Returns:
        true if the method is applicable by method invocation conversion
      • applicableByVariableArity

        protected boolean applicableByVariableArity​(ClassInstanceExpr expr,
                                                    MethodDecl method)
        Returns:
        true if the method is applicable by variable arity
      • typeCheck

        public void typeCheck()
        Checks if this diamond access is legal. The diamond access is not legal if it either is part of an inner class declaration, if it is used to access a non-generic type, or if it is part of a call to a generic constructor with explicit type arguments.
        Overrides:
        typeCheck in class ASTNode<ASTNode>
      • 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 Access
      • 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.
      • type

        public TypeDecl type()
        If this DiamondAccess node constitutes a legal use of the diamond operator, the inferred generic type for the enclosing class instance expression is returned.
        Overrides:
        type in class Access
      • isDiamond

        public boolean isDiamond()
        Overrides:
        isDiamond in class Access
      • typeArguments

        public List<TypeDecl> typeArguments​(MethodDecl decl)
        Type inference for placeholder methods.
      • typeObject

        public TypeDecl typeObject()
      • isAnonymousDecl

        public boolean isAnonymousDecl()
        Returns:
        true if this access is part of an anonymous class declaration
      • isExplicitGenericConstructorAccess

        public boolean isExplicitGenericConstructorAccess()
        Returns:
        true if the Access is part of a generic constructor invocation with explicit type arguments