Class JvmMethodSig

java.lang.Object
com.pnfsoftware.jeb.core.units.code.android.JvmMethodSig

public class JvmMethodSig extends Object
Representation of JVM internal method signature. Example: Lcom/abc/Foo;->bar(ILjava/lang/String;)V
  • Field Details

    • csig

      public String csig
      Declaring class signature.
    • mname

      public String mname
      Method name.
    • rettype

      public String rettype
      Return type signature.
    • partypes

      public List<String> partypes
      Parameter type signatures.
  • Constructor Details

    • JvmMethodSig

      public JvmMethodSig(String csig, String mname, String rettype, String... partypes)
      Create a JVM method signature.
      Parameters:
      csig - declaring class signature
      mname - method name
      rettype - return type signature
      partypes - parameter type signatures
    • JvmMethodSig

      public JvmMethodSig(String csig, String mname, String rettype, Collection<String> partypes)
      Create a JVM method signature.
      Parameters:
      csig - declaring class signature
      mname - method name
      rettype - return type signature
      partypes - parameter type signatures
  • Method Details

    • getType

      public String getType()
      Get the declaring class signature.
      Returns:
      the declaring class signature
    • getMethodName

      public String getMethodName()
      Get the method name.
      Returns:
      the method name
    • getReturnType

      public String getReturnType()
      Get the return type signature.
      Returns:
      the return type signature
    • getParameterTypes

      public List<String> getParameterTypes()
      Get the parameter type signatures.
      Returns:
      the parameter type signatures
    • generate

      public String generate()
      Generate the JVM internal method signature.
      Returns:
      the generated signature
    • parse

      public static JvmMethodSig parse(String msig)
      Explode the internal signature (full) of a method. This method throws on error.
      Parameters:
      msig - a binary method signature, eg Lcom/abc/Foo;->bar(I[J[[Ljava/lang/String;)V
      Returns:
      parsed object; throws on error
    • parseSafe

      public static JvmMethodSig parseSafe(String msig)
      Explode the internal signature (full) of a method. This method does not throw on error.
      Parameters:
      msig - a binary method signature, eg Lcom/abc/Foo;->bar(I[J[[Ljava/lang/String;)V
      Returns:
      null on error
    • nameAndParams

      public static String nameAndParams(String msig)
      Parse a jvvm method name and return the name+params string, eg bar(I[J[[Ljava/lang/String;) for msig= Lcom/abc/Foo;->bar(I[J[[Ljava/lang/String;)V
      Parameters:
      msig - a binary method signature
      Returns:
      null on error