private static StartOptions[] getStartOptions(int options) {
   if (options == 0) {
     return new StartOptions[0];
   }
   Collection<StartOptions> result = new ArrayList<Module.StartOptions>(2);
   if ((options & Bundle.START_TRANSIENT) != 0) {
     result.add(StartOptions.TRANSIENT);
   }
   if ((options & Bundle.START_ACTIVATION_POLICY) != 0) {
     result.add(StartOptions.USE_ACTIVATION_POLICY);
   }
   return result.toArray(new StartOptions[result.size()]);
 }
Exemplo n.º 2
0
 /**
  * Returns all Groovy classes loaded by this class loader.
  *
  * @return all classes loaded by this class loader
  */
 public Class[] getLoadedClasses() {
   synchronized (classCache) {
     final Collection<Class> values = classCache.values();
     return values.toArray(new Class[values.size()]);
   }
 }