Class CstCallSite

All Implemented Interfaces:
ToHuman, Comparable<Constant>

public final class CstCallSite extends CstArray
Constant type to represent a call site.
  • Method Details

    • make

      public static CstCallSite make(CstMethodHandle bootstrapHandle, CstNat nat, BootstrapMethodArgumentsList optionalArguments)
      Creates an instance of a CstCallSite.
      Parameters:
      bootstrapHandle - non-null; the bootstrap method handle to invoke
      nat - non-null; the name and type to be resolved by the bootstrap method handle
      optionalArguments - null-ok; optional arguments to provide to the bootstrap method
      Returns:
      a new CstCallSite instance
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class CstArray
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class CstArray
    • compareTo0

      protected int compareTo0(Constant other)
      Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.
      Overrides:
      compareTo0 in class CstArray
      Parameters:
      other - non-null; the instance to compare to
      Returns:
      -1, 0, or 1, as usual for a comparison
    • toString

      public String toString()
      Overrides:
      toString in class CstArray
    • typeName

      public String typeName()
      Returns the human name for the particular type of constant this instance is.
      Overrides:
      typeName in class CstArray
      Returns:
      non-null; the name
    • isCategory2

      public boolean isCategory2()
      Returns true if this instance is a category-2 constant, meaning it takes up two slots in the constant pool, or false if this instance is category-1.
      Overrides:
      isCategory2 in class CstArray
      Returns:
      true iff this instance is category-2
    • toHuman

      public String toHuman()
      Return the "human" string form of this instance. This is generally less "debuggy" than toString().
      Specified by:
      toHuman in interface ToHuman
      Overrides:
      toHuman in class CstArray
      Returns:
      non-null; the human string form