View Javadoc
1   package mockit.asm.types;
2   
3   import edu.umd.cs.findbugs.annotations.NonNull;
4   
5   import org.checkerframework.checker.index.qual.NonNegative;
6   
7   public final class MethodType extends ReferenceType {
8       /**
9        * Returns the Java type corresponding to the given method descriptor.
10       */
11      public static MethodType create(@NonNull String methodDescriptor) {
12          char[] typeDesc = methodDescriptor.toCharArray();
13          return new MethodType(typeDesc, 0, typeDesc.length);
14      }
15  
16      /**
17       * Initializes a method type.
18       *
19       * @param typeDesc
20       *            a buffer containing the descriptor of the method type
21       * @param off
22       *            the offset of this descriptor in the previous buffer
23       * @param len
24       *            the length of this descriptor
25       */
26      MethodType(@NonNull char[] typeDesc, @NonNegative int off, @NonNegative int len) {
27          super(typeDesc, off, len);
28      }
29  
30      @NonNull
31      @Override
32      public String getClassName() {
33          throw new UnsupportedOperationException();
34      }
35  
36      @Override
37      public int getSize() {
38          throw new UnsupportedOperationException();
39      }
40  
41      @Override
42      public int getOpcode(int opcode) {
43          throw new UnsupportedOperationException();
44      }
45  }