Class SignatureParser

java.lang.Object
jadx.core.dex.nodes.parser.SignatureParser

public class SignatureParser extends Object
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • STOP_CHAR

      private static final char STOP_CHAR
      See Also:
    • sign

      private final String sign
    • end

      private final int end
    • pos

      private int pos
    • mark

      private int mark
  • Constructor Details

    • SignatureParser

      public SignatureParser(String signature)
  • Method Details

    • fromNode

      @Nullable public static @Nullable SignatureParser fromNode(IAttributeNode node)
    • getSignature

      @Nullable public static @Nullable String getSignature(IAttributeNode node)
    • next

      private char next()
    • lookAhead

      private boolean lookAhead(char ch)
    • mark

      private void mark()
    • slice

      private String slice()
      Exclusive slice.
      Returns:
      string from 'mark' to current position (not including current character)
    • inclusiveSlice

      private String inclusiveSlice()
      Inclusive slice (includes current character)
    • skipUntil

      private boolean skipUntil(char untilChar)
    • consume

      private void consume(char exp)
    • tryConsume

      private boolean tryConsume(char exp)
    • consumeUntil

      @Nullable public @Nullable String consumeUntil(char lastChar)
    • consumeType

      public ArgType consumeType()
    • consumeTypeList

      public List<ArgType> consumeTypeList()
    • consumeObjectType

      private ArgType consumeObjectType(boolean innerType)
    • consumeGenericArgs

      private List<ArgType> consumeGenericArgs()
    • consumeGenericTypeParameters

      public List<ArgType> consumeGenericTypeParameters()
      Map of generic types names to extends classes.

      Example: "<T:Ljava/lang/Exception;:Ljava/lang/Object;>"

    • consumeExtendsTypesList

      private List<ArgType> consumeExtendsTypesList()
      List of types separated by ':' last type is 'java.lang.Object'.

      Example: "Ljava/lang/Exception;:Ljava/lang/Object;"

    • consumeMethodArgs

      public List<ArgType> consumeMethodArgs(int argsCount)
    • mergeSignature

      private static String mergeSignature(List<String> list)
    • getSignature

      public String getSignature()
    • debugString

      private String debugString()
    • toString

      public String toString()
      Overrides:
      toString in class Object