Class Signature

java.lang.Object
org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
org.fife.rsta.ac.java.classreader.attributes.Signature

public class Signature extends AttributeInfo
The Signature attribute is an optional fixed-length attribute in the attribute table of the ClassFile, field_info and method_info structures.

WARNING: This code is a complete mess.

Version:
1.0
  • Field Details

    • signature

      private String signature
  • Constructor Details

  • Method Details

    • getClassParamTypes

      public List<String> getClassParamTypes()
      Returns the class-param types of this method.
      Returns:
      The class-param types.
    • skipLtGt

      private int skipLtGt(String str, int start)
    • getMethodParamTypes

      public List<String> getMethodParamTypes(MethodInfo mi, ClassFile cf, boolean qualified)
      Returns the parameter types for parameters of this method.
      Parameters:
      mi - The method information.
      cf - The class file being parsed.
      qualified - Whether the results should be fully-qualified.
      Returns:
      The return types.
    • getMethodReturnType

      public String getMethodReturnType(MethodInfo mi, ClassFile cf, boolean qualified)
      Returns the return type of this method.
      Parameters:
      mi - The method information.
      cf - The class file being parsed.
      qualified - Whether the result should be fully-qualified.
      Returns:
      The return type.
    • getSignature

      public String getSignature()
    • getTypeArgument

      private String getTypeArgument(String typeVar, ClassFile cf, Map<String,String> additionalTypeArgs)
      Returns the type argument specified for a given type parameter.
      Parameters:
      typeVar - The type parameter name.
      cf - The class file with generic methods.
      additionalTypeArgs - Additional type arguments for a method (such as for "<T> T[] toArray(T[] a)", where the "T" type parameter is the type of an argument passed to it).
      Returns:
      The type argument, or null if the given type parameter isn't defined.
    • parseAdditionalTypeArgs

      private Map<String,String> parseAdditionalTypeArgs(String typeParams)
    • parseParamDescriptor

      private Signature.ParamDescriptorResult parseParamDescriptor(String str, ClassFile cf, Map<String,String> additionalTypeArgs, MethodInfo mi, String errorDesc, Signature.ParamDescriptorResult res, boolean qualified)
    • toString

      public String toString()
      Overrides:
      toString in class Object