Class StatementContext<N extends Statement>

    • Constructor Detail

      • StatementContext

        public StatementContext​(N wrappedNode,
                                TypeSolver typeSolver)
    • Method Detail

      • solveInBlockAsValue

        public static java.util.Optional<Value> solveInBlockAsValue​(java.lang.String name,
                                                                    TypeSolver typeSolver,
                                                                    Statement stmt)
      • solveSymbolAsValue

        public java.util.Optional<Value> solveSymbolAsValue​(java.lang.String name)
        Description copied from interface: Context
        Used where a symbol is being used (e.g. solving x when used as an argument doubleThis(x), or calculation return x * 2;).
        Parameters:
        name - the variable / reference / identifier used.
        Returns:
        // FIXME: Better documentation on how this is different to solveSymbol()
      • solveSymbol

        public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol​(java.lang.String name)
        Description copied from interface: Context
        Used where a symbol is being used (e.g. solving x when used as an argument doubleThis(x), or calculation return x * 2;).
        Parameters:
        name - the variable / reference / identifier used.
        Returns:
        // FIXME: Better documentation on how this is different to solveSymbolAsValue()
      • solveSymbol

        private SymbolReference<? extends ResolvedValueDeclaration> solveSymbol​(java.lang.String name,
                                                                                boolean iterateAdjacentStmts)
        Used where a symbol is being used (e.g. solving x when used as an argument doubleThis(x), or calculation return x * 2;).
        Parameters:
        name - the variable / reference / identifier used.
        iterateAdjacentStmts - flag to iterate adjacent statements, should be set to true except when calling itself in order to prevent revisiting already visited symbols.
        Returns:
        // FIXME: Better documentation on how this is different to solveSymbolAsValue()
      • solveMethod

        public SymbolReference<ResolvedMethodDeclaration> solveMethod​(java.lang.String name,
                                                                      java.util.List<ResolvedType> argumentsTypes,
                                                                      boolean staticOnly)
        Description copied from interface: Context
        We find the method declaration which is the best match for the given name and list of typeParametersValues.
      • getIntroducedTypePatterns

        public java.util.List<TypePatternExpr> getIntroducedTypePatterns()