Class Runtime

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      close the current runtime and shutdown all the engine related resources.
      void config​(io.vertx.core.json.JsonObject config)
      passes the given configuration to the runtime.
      org.graalvm.polyglot.Value eval​(String script)
      Evals a given sript string.
      org.graalvm.polyglot.Value eval​(String script, boolean interactive)
      Evals a given script string.
      org.graalvm.polyglot.Value eval​(String script, String name, boolean literal)
      Evals a given sript string.
      org.graalvm.polyglot.Value eval​(String script, String name, String contentType, boolean interactive)
      Evals a given script string.
      org.graalvm.polyglot.Value eval​(org.graalvm.polyglot.Source source)
      Evals a given script string.
      org.graalvm.polyglot.Value get​(String name)
      Gets a value from the global scope.
      org.graalvm.polyglot.Value parse​(String script, boolean interactive)
      Parse a given script string.
      org.graalvm.polyglot.Value parse​(String script, String contentType, boolean interactive)
      Parse a given script string.
      void put​(String name, Object value)
      Puts a value to the global scope.
    • Method Detail

      • config

        public void config​(io.vertx.core.json.JsonObject config)
        passes the given configuration to the runtime.
        Parameters:
        config - given configuration.
      • eval

        public org.graalvm.polyglot.Value eval​(String script,
                                               String name,
                                               String contentType,
                                               boolean interactive)
        Evals a given script string.
        Parameters:
        script - string containing code.
        name - string containing name of the script (e.g.: the filename).
        contentType - the script content type
        interactive - literals are non listed on debug sessions
        Returns:
        returns the evaluation result.
      • eval

        public org.graalvm.polyglot.Value eval​(org.graalvm.polyglot.Source source)
        Evals a given script string.
        Parameters:
        source - source containing code.
        Returns:
        returns the evaluation result.
      • put

        public void put​(String name,
                        Object value)
        Puts a value to the global scope.
        Parameters:
        name - the key to identify the value in the global scope
        value - the value to store.
      • get

        public org.graalvm.polyglot.Value get​(String name)
        Gets a value from the global scope.
        Parameters:
        name - the key to identify the value in the global scope
        Returns:
        the value
      • close

        public void close()
        close the current runtime and shutdown all the engine related resources.
      • eval

        public org.graalvm.polyglot.Value eval​(String script,
                                               boolean interactive)
        Evals a given script string.
        Parameters:
        script - string containing code.
        interactive - literals are non listed on debug sessions
        Returns:
        returns the evaluation result.
      • parse

        public org.graalvm.polyglot.Value parse​(String script,
                                                boolean interactive)
        Parse a given script string.
        Parameters:
        script - string containing code.
        interactive - literals are non listed on debug sessions
        Returns:
        returns the parsing result.
      • parse

        public org.graalvm.polyglot.Value parse​(String script,
                                                String contentType,
                                                boolean interactive)
        Parse a given script string.
        Parameters:
        script - string containing code.
        contentType - the script content type
        interactive - literals are non listed on debug sessions
        Returns:
        returns the parsing result.
      • eval

        public org.graalvm.polyglot.Value eval​(String script,
                                               String name,
                                               boolean literal)
        Evals a given sript string.
        Parameters:
        script - string containing code.
        name - string containing name of the script (e.g.: the filename).
        literal - literals are non listed on debug sessions
        Returns:
        returns the evaluation result.
      • eval

        public org.graalvm.polyglot.Value eval​(String script)
        Evals a given sript string.
        Parameters:
        script - string containing code.
        Returns:
        returns the evaluation result.