Пример #1
0
 public List<ReferenceType> definedClasses() {
   ArrayList<ReferenceType> definedClasses = new ArrayList<ReferenceType>();
   for (ReferenceType type : vm.allClasses()) {
     if (type.isPrepared() && equals(type.classLoader())) {
       definedClasses.add(type);
     }
   }
   return definedClasses;
 }
Пример #2
0
 Type findType(String signature) throws ClassNotLoadedException {
   List<ReferenceType> types = visibleClasses();
   Iterator<ReferenceType> iter = types.iterator();
   while (iter.hasNext()) {
     ReferenceType type = iter.next();
     if (type.signature().equals(signature)) {
       return type;
     }
   }
   JNITypeParser parser = new JNITypeParser(signature);
   throw new ClassNotLoadedException(
       parser.typeName(), "Class " + parser.typeName() + " not loaded");
 }