Interface IMethod

  • Method Details Link icon

    • isSynchronized Link icon

      boolean isSynchronized()
      Is this method synchronized?
    • isClinit Link icon

      boolean isClinit()
      Is this method a class initializer?
    • isInit Link icon

      boolean isInit()
      Is this method an object initializer?
    • isNative Link icon

      boolean isNative()
      Is this method native?
    • isWalaSynthetic Link icon

      boolean isWalaSynthetic()
      Is the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer to isSynthetic()
    • isSynthetic Link icon

      boolean isSynthetic()
      Is this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)
    • isAbstract Link icon

      boolean isAbstract()
      Is this method abstract?
    • isPrivate Link icon

      boolean isPrivate()
      Is this method private?
    • isProtected Link icon

      boolean isProtected()
      Is this method protected?
    • isPublic Link icon

      boolean isPublic()
      Is this method public?
    • isFinal Link icon

      boolean isFinal()
      Is this method final?
    • isBridge Link icon

      boolean isBridge()
      Is this method a bridge method? See JLS 3rd Edition 15.12.4.5
    • getReference Link icon

      MethodReference getReference()
      Returns:
      canonical MethodReference corresponding to this method
    • hasExceptionHandler Link icon

      boolean hasExceptionHandler()
      Returns:
      true iff this method has at least one exception handler
    • getParameterType Link icon

      TypeReference getParameterType(int i)
      By convention, for a non-static method, getParameterType(0) is the this pointer
    • getReturnType Link icon

      TypeReference getReturnType()
      Returns:
      the name of the return type for this method
    • getNumberOfParameters Link icon

      int getNumberOfParameters()
      Method getNumberOfParameters. This result includes the "this" pointer if applicable
    • getDeclaredExceptions Link icon

      Returns:
      an array of the exception types declared by the throws clause for this method, or null if there are none
      Throws:
      InvalidClassFileException
      UnsupportedOperationException
    • getLineNumber Link icon

      int getLineNumber(int bcIndex)
      Returns:
      the source line number corresponding to a particular bytecode index, or -1 if the information is not available.
    • getSourcePosition Link icon

      IMethod.SourcePosition getSourcePosition(int instructionIndex) throws InvalidClassFileException
      Throws:
      InvalidClassFileException
    • getParameterSourcePosition Link icon

      IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException
      Throws:
      InvalidClassFileException
    • getLocalVariableName Link icon

      String getLocalVariableName(int bcIndex, int localNumber)
      Returns:
      the (source code) name of the local variable of a given number at the specified program counter, or null if the information is not available.
    • getSignature Link icon

      String getSignature()
      something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
    • getSelector Link icon

      Selector getSelector()
      something like: foo(Ljava/langString;)Ljava/lang/Class;
    • getDescriptor Link icon

      Descriptor getDescriptor()
      something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
    • hasLocalVariableTable Link icon

      boolean hasLocalVariableTable()
      Returns:
      true iff the local variable table information for this method is available
    • getNumberOfDefaultParameters Link icon

      default int getNumberOfDefaultParameters()
    • isAnnotation Link icon

      boolean isAnnotation()
    • isEnum Link icon

      boolean isEnum()
    • isModule Link icon

      boolean isModule()