Пример #1
0
 /** Create a class name from a type name. For example Lfoo.bar$$; becomes the string foo.bar */
 @Pure
 public String annotationClassToAnnotationInterface() {
   if (VM.VerifyAssertions) {
     VM._assert(val.length > 0);
     VM._assert(val[0] == 'L' && val[val.length - 1] == ';', toString());
   }
   return StringUtilities.asciiBytesToString(val, 1, val.length - 4).replace('/', '.');
 }
Пример #2
0
 /**
  * Return name of class file corresponding to "this" class descriptor. this: class descriptor -
  * something like "Ljava/lang/String;"
  *
  * @return class file name - something like "java/lang/String.class"
  */
 @Pure
 public String classFileNameFromDescriptor() {
   if (VM.VerifyAssertions) {
     VM._assert(val.length > 0);
     VM._assert(val[0] == 'L' && val[val.length - 1] == ';');
   }
   if (unicodeStringOrJTOCoffset == null) {
     return StringUtilities.asciiBytesToString(val, 1, val.length - 2) + ".class";
   } else {
     return toUnicodeStringInternal().substring(1, val.length - 1) + ".class";
   }
 }
Пример #3
0
 /** Return printable representation of "this" atom. Does not correctly handle UTF8 translation. */
 @Override
 @Pure
 public String toString() {
   return StringUtilities.asciiBytesToString(val);
 }