Class BytecodeReadingParanamer.Type

  • Enclosing class:
    BytecodeReadingParanamer

    private static class BytecodeReadingParanamer.Type
    extends java.lang.Object
    A Java type. This class can be used to make it easier to manipulate type and method descriptors.
    • Constructor Detail

      • Type

        private Type​(int sort)
        Constructs a primitive type.
        Parameters:
        sort - the sort of the primitive type to be constructed.
      • Type

        private Type​(int sort,
                     char[] buf,
                     int off,
                     int len)
        Constructs a reference type.
        Parameters:
        sort - the sort of the reference type to be constructed.
        buf - a buffer containing the descriptor of the previous type.
        off - the offset of this descriptor in the previous buffer.
        len - the length of this descriptor.
    • Method Detail

      • getArgumentTypes

        private static BytecodeReadingParanamer.Type[] getArgumentTypes​(java.lang.String methodDescriptor)
        Returns the Java types corresponding to the argument types of the given method descriptor.
        Parameters:
        methodDescriptor - a method descriptor.
        Returns:
        the Java types corresponding to the argument types of the given method descriptor.
      • getType

        private static BytecodeReadingParanamer.Type getType​(char[] buf,
                                                             int off)
        Returns the Java type corresponding to the given type descriptor.
        Parameters:
        buf - a buffer containing a type descriptor.
        off - the offset of this descriptor in the previous buffer.
        Returns:
        the Java type corresponding to the given type descriptor.
      • getDimensions

        private int getDimensions()
        Returns the number of dimensions of this array type. This method should only be used for an array type.
        Returns:
        the number of dimensions of this array type.
      • getElementType

        private BytecodeReadingParanamer.Type getElementType()
        Returns the type of the elements of this array type. This method should only be used for an array type.
        Returns:
        Returns the type of the elements of this array type.
      • getClassName

        private java.lang.String getClassName()
        Returns the name of the class corresponding to this type.
        Returns:
        the fully qualified name of the class corresponding to this type.