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