Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 private static MethodHandle[] makeLists() {
   ArrayList<MethodHandle> mhs = new ArrayList<>();
   for (; ; ) {
     MethodHandle mh = findCollector("list", mhs.size(), List.class);
     if (mh == null) break;
     mhs.add(mh);
   }
   assert (mhs.size() == 11); // current number of methods
   return mhs.toArray(new MethodHandle[MAX_ARITY + 1]);
 }
Ejemplo n.º 3
0
 private static MethodHandle[] makeFillArrays() {
   ArrayList<MethodHandle> mhs = new ArrayList<>();
   mhs.add(null); // there is no empty fill; at least a0 is required
   for (; ; ) {
     MethodHandle mh =
         findCollector("fillArray", mhs.size(), Object[].class, Integer.class, Object[].class);
     if (mh == null) break;
     mhs.add(mh);
   }
   assert (mhs.size() == 11); // current number of methods
   return mhs.toArray(new MethodHandle[0]);
 }