Class JavaScriptCore

java.lang.Object
org.webkitgtk.jsc.JavaScriptCore

@Generated("org.javagi.JavaGI") public final class JavaScriptCore extends Object
Constants and functions that are declared in the global JavaScriptCore namespace.
  • Field Details

    • MAJOR_VERSION

      public static final int MAJOR_VERSION
      Like jsc_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • MICRO_VERSION

      public static final int MICRO_VERSION
      Like jsc_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • MINOR_VERSION

      public static final int MINOR_VERSION
      Like jsc_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • OPTIONS_USE_DFG

      public static final String OPTIONS_USE_DFG
      Allows the DFG JIT to be used if true. Option type: OptionType.BOOLEAN Default value: true.
      Since:
      2.24
      See Also:
    • OPTIONS_USE_FTL

      public static final String OPTIONS_USE_FTL
      Allows the FTL JIT to be used if true. Option type: OptionType.BOOLEAN Default value: true.
      Since:
      2.24
      See Also:
    • OPTIONS_USE_JIT

      public static final String OPTIONS_USE_JIT
      Allows the executable pages to be allocated for JIT and thunks if true. Option type: OptionType.BOOLEAN Default value: true.
      Since:
      2.24
      See Also:
    • OPTIONS_USE_LLINT

      public static final String OPTIONS_USE_LLINT
      Allows the LLINT to be used if true. Option type: OptionType.BOOLEAN Default value: true.
      Since:
      2.24
      See Also:
  • Constructor Details

    • JavaScriptCore

      public JavaScriptCore()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • getMajorVersion

      public static int getMajorVersion()

      Returns the major version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 1.)

      This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the JSC_MAJOR_VERSION macro, which represents the major version of the JavaScriptCore headers you have included when compiling your code.

      Returns:
      the major version number of the JavaScriptCore library
    • getMicroVersion

      public static int getMicroVersion()

      Returns the micro version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 3.)

      This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the JSC_MICRO_VERSION macro, which represents the micro version of the JavaScriptCore headers you have included when compiling your code.

      Returns:
      the micro version number of the JavaScriptCore library
    • getMinorVersion

      public static int getMinorVersion()

      Returns the minor version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 8.)

      This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the JSC_MINOR_VERSION macro, which represents the minor version of the JavaScriptCore headers you have included when compiling your code.

      Returns:
      the minor version number of the JavaScriptCore library
    • optionsForeach

      public static void optionsForeach(@Nullable OptionsFunc function)
      Iterates all available options calling function for each one. Iteration can stop early if function returns false.
      Parameters:
      function - a JSCOptionsFunc callback
      Since:
      2.24
    • optionsGetBoolean

      public static boolean optionsGetBoolean(String option, Out<Boolean> value)
      Get option as a gboolean value.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsGetDouble

      public static boolean optionsGetDouble(String option, Out<Double> value)
      Get option as a gdouble value.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsGetInt

      public static boolean optionsGetInt(String option, Out<Integer> value)
      Get option as a gint value.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsGetOptionGroup

      public static OptionGroup optionsGetOptionGroup()
      Create a GOptionGroup to handle JSCOptions as command line arguments. The options will be exposed as command line arguments with the form --jsc-<option>=<value>. Each entry in the returned GOptionGroup is configured to apply the corresponding option during command line parsing. Applications only need to pass the returned group to g_option_context_add_group(), and the rest will be taken care for automatically.
      Returns:
      a GOptionGroup for the JSCOptions
      Since:
      2.24
    • optionsGetRangeString

      public static boolean optionsGetRangeString(String option, Out<String> value)
      Get option as a range string. The string must be in the format [!]<low>[:<high>] where low and high are guint values. Values between low and high (both included) will be considered in the range, unless ! is used to invert the range.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsGetSize

      public static boolean optionsGetSize(String option, Out<Long> value)
      Get option as a gsize value.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsGetString

      public static boolean optionsGetString(String option, Out<String> value)
      Get option as a string.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsGetUint

      public static boolean optionsGetUint(String option, Out<Integer> value)
      Get option as a guint value.
      Parameters:
      option - the option identifier
      value - return location for the option value
      Returns:
      true if value has been set or false if the option doesn't exist
      Since:
      2.24
    • optionsSetBoolean

      public static boolean optionsSetBoolean(String option, boolean value)
      Set option as a gboolean value.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24
    • optionsSetDouble

      public static boolean optionsSetDouble(String option, double value)
      Set option as a gdouble value.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24
    • optionsSetInt

      public static boolean optionsSetInt(String option, int value)
      Set option as a gint value.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24
    • optionsSetRangeString

      public static boolean optionsSetRangeString(String option, String value)
      Set option as a range string. The string must be in the format [!]<low>[:<high>] where low and high are guint values. Values between low and high (both included) will be considered in the range, unless ! is used to invert the range.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24
    • optionsSetSize

      public static boolean optionsSetSize(String option, long value)
      Set option as a gsize value.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24
    • optionsSetString

      public static boolean optionsSetString(String option, String value)
      Set option as a string.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24
    • optionsSetUint

      public static boolean optionsSetUint(String option, int value)
      Set option as a guint value.
      Parameters:
      option - the option identifier
      value - the value to set
      Returns:
      true if option was correctly set or false otherwise.
      Since:
      2.24