Interface IJavaConstantFactory


@Ser public interface IJavaConstantFactory
Builder for Java AST constants.
  • Method Details

    • createNull

      IJavaConstant createNull()
      Retrieve the AST null value.
      Returns:
      the null constant
    • createBoolean

      default IJavaConstant createBoolean(boolean v)
      Create an AST boolean value.
      Parameters:
      v - boolean value
      Returns:
      boolean constant
    • createBoolean

      IJavaConstant createBoolean(boolean v, String originInfo)
      Create an AST boolean value.
      Parameters:
      v - boolean value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      boolean constant
    • createByte

      default IJavaConstant createByte(byte v)
      Create an AST byte value.
      Parameters:
      v - byte value
      Returns:
      byte constant
    • createByte

      IJavaConstant createByte(byte v, String originInfo)
      Create an AST byte value.
      Parameters:
      v - byte value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      byte constant
    • createChar

      default IJavaConstant createChar(char v)
      Create an AST char value.
      Parameters:
      v - char value
      Returns:
      char constant
    • createChar

      IJavaConstant createChar(char v, String originInfo)
      Create an AST char value.
      Parameters:
      v - char value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      char constant
    • createShort

      default IJavaConstant createShort(short v)
      Create an AST short value.
      Parameters:
      v - short value
      Returns:
      short constant
    • createShort

      IJavaConstant createShort(short v, String originInfo)
      Create an AST short value.
      Parameters:
      v - short value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      short constant
    • createInt

      default IJavaConstant createInt(int v)
      Create an AST int value.
      Parameters:
      v - int value
      Returns:
      int constant
    • createInt

      IJavaConstant createInt(int v, String originInfo)
      Create an AST int value.
      Parameters:
      v - int value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      int constant
    • createLong

      default IJavaConstant createLong(long v)
      Create an AST long value.
      Parameters:
      v - long value
      Returns:
      long constant
    • createLong

      IJavaConstant createLong(long v, String originInfo)
      Create an AST long value.
      Parameters:
      v - long value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      long constant
    • createFloat

      default IJavaConstant createFloat(float v)
      Create an AST float value.
      Parameters:
      v - float value
      Returns:
      float constant
    • createFloat

      IJavaConstant createFloat(float v, String originInfo)
      Create an AST float value.
      Parameters:
      v - float value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      float constant
    • createDouble

      default IJavaConstant createDouble(double v)
      Create an AST double value.
      Parameters:
      v - double value
      Returns:
      double constant
    • createDouble

      IJavaConstant createDouble(double v, String originInfo)
      Create an AST double value.
      Parameters:
      v - double value
      originInfo - optional metadata information indicating the origin of the value
      Returns:
      double constant
    • createString

      default IJavaConstant createString(String v)
      Create an AST String object.
      Parameters:
      v - string value
      Returns:
      string constant
    • createString

      IJavaConstant createString(String v, String originInfo)
      Create an AST String object. Note that the created object is not necessarily backed by a lower-level (dex) string item. If the user needs to ensure that an AST String object is backed by a dex item, the existence of a matching dex string must be verified, or a new dex string be created. Refer to IDexUnit.addString(String).
      Parameters:
      v - string value
      originInfo - optional metadata information indicating the origin of the string; leave null if not necessary
      Returns:
      string constant