Lines Matching refs:descriptor

25  * local, on a stack, or in a method descriptor. Instances of this
240 /** {@code non-null;} field descriptor for the type */
241 private final String descriptor;
284 * given descriptor. See vmspec-2 sec4.3.2 for details on the
285 * field descriptor syntax. This method does <i>not</i> allow
287 * descriptor.
289 * @param descriptor {@code non-null;} the descriptor
291 * @throws IllegalArgumentException thrown if the descriptor has
294 public static Type intern(String descriptor) {
297 result = internTable.get(descriptor);
305 firstChar = descriptor.charAt(0);
308 throw new IllegalArgumentException("descriptor is empty");
311 throw new NullPointerException("descriptor == null");
319 result = intern(descriptor.substring(1));
325 * intern cache, then it had better be the descriptor for a class.
328 int length = descriptor.length();
330 (descriptor.charAt(length - 1) != ';')) {
331 throw new IllegalArgumentException("bad descriptor: " + descriptor);
345 char c = descriptor.charAt(i);
352 throw new IllegalArgumentException("bad descriptor: " + descriptor);
357 (descriptor.charAt(i - 1) == '/')) {
358 throw new IllegalArgumentException("bad descriptor: " + descriptor);
365 result = new Type(descriptor, BT_OBJECT);
371 * given descriptor, allowing {@code "V"} to return the type
375 * @param descriptor {@code non-null;} the descriptor
377 * @throws IllegalArgumentException thrown if the descriptor has
380 public static Type internReturnType(String descriptor) {
382 if (descriptor.equals("V")) {
388 throw new NullPointerException("descriptor == null");
391 return intern(descriptor);
424 * @param descriptor {@code non-null;} the field descriptor for the type
429 private Type(String descriptor, int basicType, int newAt) {
430 if (descriptor == null) {
431 throw new NullPointerException("descriptor == null");
442 this.descriptor = descriptor;
455 * @param descriptor {@code non-null;} the field descriptor for the type
459 private Type(String descriptor, int basicType) {
460 this(descriptor, basicType, -1);
478 return descriptor.equals(((Type) other).descriptor);
484 return descriptor.hashCode();
489 return descriptor.compareTo(other.descriptor);
495 return descriptor;
511 default: return descriptor;
568 * Gets the descriptor.
570 * @return {@code non-null;} the descriptor
573 return descriptor;
588 descriptor);
591 if (descriptor.charAt(0) == '[') {
592 className = descriptor;
594 className = descriptor.substring(1, descriptor.length() - 1);
721 return (descriptor.charAt(0) == '[');
768 descriptor);
781 arrayType = putIntern(new Type('[' + descriptor, BT_OBJECT));
795 if (descriptor.charAt(0) != '[') {
797 descriptor);
799 componentType = intern(descriptor.substring(1));
820 descriptor);
830 descriptor);
834 * Create a new descriptor that is unique and shouldn't conflict
837 String newDesc = 'N' + Hex.u2(newAt) + descriptor;
853 String descriptor = type.getDescriptor();
854 Type already = internTable.get(descriptor);
858 internTable.put(descriptor, type);