Class JavaMethod

java.lang.Object
com.ibm.dtfj.java.j9.JavaMethod
All Implemented Interfaces:
JavaMember, JavaMethod

public class JavaMethod extends Object implements JavaMethod
  • Constructor Details

  • Method Details

    • getBytecodeSections

      public Iterator getBytecodeSections()
      Description copied from interface: JavaMethod
      Get the set of ImageSections containing the bytecode of this method.
      Specified by:
      getBytecodeSections in interface JavaMethod
      Returns:
      an iterator over a collection of ImageSections. Each ImageSection contains data (usually bytecodes) used in executing this method in interpreted mode.

      The collection may be empty for native methods, or pre-compiled methods.

      Typically, the collection will contain no more than one section, but this is not guaranteed.

      See Also:
    • getCompiledSections

      public Iterator getCompiledSections()
      Description copied from interface: JavaMethod
      Get the set of ImageSections containing the compiled code of this method.
      Specified by:
      getCompiledSections in interface JavaMethod
      Returns:
      an iterator over a collection of ImageSections. Each ImageSection contains data (usually executable code) used in executing this method in compiled mode.
      See Also:
    • getModifiers

      public int getModifiers() throws CorruptDataException
      Description copied from interface: JavaMember
      Get the set of modifiers for this field or method - a set of bits
      Specified by:
      getModifiers in interface JavaMember
      Returns:
      the modifiers for this field or method. The values for the constants representing the modifiers can be obtained from java.lang.reflect.Modifier.
      Throws:
      CorruptDataException
    • getDeclaringClass

      public JavaClass getDeclaringClass() throws CorruptDataException, DataUnavailable
      Description copied from interface: JavaMember
      Get the class which declares this field or method
      Specified by:
      getDeclaringClass in interface JavaMember
      Returns:
      the JavaClass which declared this field or method
      Throws:
      CorruptDataException
      DataUnavailable
    • getName

      public String getName() throws CorruptDataException
      Description copied from interface: JavaMember
      Get the name of the field or method
      Specified by:
      getName in interface JavaMember
      Returns:
      the name of the field or method
      Throws:
      CorruptDataException
    • getSignature

      public String getSignature() throws CorruptDataException
      Description copied from interface: JavaMember
      Get the signature of the field or method
      Specified by:
      getSignature in interface JavaMember
      Returns:
      the signature of the field or method. e.g. "(Ljava/lang/String;)V"
      Throws:
      CorruptDataException
    • equals

      public boolean equals(Object obj)
      Description copied from class: java.lang.Object
      Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. The implementation in Object answers true only if the argument is the exact same object as the receiver (==).
      Specified by:
      equals in interface JavaMember
      Specified by:
      equals in interface JavaMethod
      Overrides:
      equals in class Object
      Parameters:
      obj -
      Returns:
      True if the given object refers to the same Java Method in the image
      See Also:
    • hashCode

      public int hashCode()
      Description copied from class: java.lang.Object
      Answers an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.
      Specified by:
      hashCode in interface JavaMember
      Overrides:
      hashCode in class Object
      Returns:
      the receiver's hash.
      See Also:
    • createNewBytecodeSection

      public void createNewBytecodeSection(long start, long size)
    • createNewJITSection

      public void createNewJITSection(long id, long start, long size)