Module openj9.dtfj

Class J9ConstantHelper

java.lang.Object
com.ibm.j9ddr.vm29.j9.J9ConstantHelper

public final class J9ConstantHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    getBoolean(Class<?> clazz, String name, boolean defaultValue)
    Using reflection, read the value of a public static final boolean field from the given class or, if the field is not present, return the default value provided.
    static int
    getInt(Class<?> clazz, String name, int defaultValue)
    Using reflection, read the value of a public static final int field from the given class or, if the field is not present, return the default value provided.
    static long
    getLong(Class<?> clazz, String name, long defaultValue)
    Using reflection, read the value of a public static final long field from the given class or, if the field is not present, return the default value provided.

    Methods declared in class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • J9ConstantHelper

      public J9ConstantHelper()
  • Method Details

    • getLong

      public static long getLong(Class<?> clazz, String name, long defaultValue)
      Using reflection, read the value of a public static final long field from the given class or, if the field is not present, return the default value provided.
      Parameters:
      clazz - the class which owns the field of interest
      name - the name of the field
      defaultValue - the value to be returned if the field is not present
      Returns:
      the value of the field, or the default value
    • getBoolean

      public static boolean getBoolean(Class<?> clazz, String name, boolean defaultValue)
      Using reflection, read the value of a public static final boolean field from the given class or, if the field is not present, return the default value provided.
      Parameters:
      clazz - the class which owns the field of interest
      name - the name of the field
      defaultValue - the value to be returned if the field is not present
      Returns:
      the value of the boolean field, or the default value
    • getInt

      public static int getInt(Class<?> clazz, String name, int defaultValue)
      Using reflection, read the value of a public static final int field from the given class or, if the field is not present, return the default value provided.
      Parameters:
      clazz - the class which owns the field of interest
      name - the name of the field
      defaultValue - the value to be returned if the field is not present
      Returns:
      the value of the field, or the default value