Package java.util

Examples of java.util.HashSet.toArray()


            for (int j = 0; j < pairs.length; ++j) {
              list.add(pairs[j]);
            }
          }
        }
        data = (ObjectIDPair[]) list.toArray(new ObjectIDPair[list
            .size()]);
      } else {
        data = null;
      }
    } else {
View Full Code Here


      File common = new File(jbossHome, "common");
      buildJarSet(common, jarFiles);
      File all = new File(jbossHome, "server/all");
      buildJarSet(all, jarFiles);
      URL[] cp = new URL[jarFiles.size()];
      jarFiles.toArray(cp);
      ClassLoader parent = Thread.currentThread().getContextClassLoader();
      URLClassLoader completeClasspath = new URLClassLoader(cp, parent);

      TreeMap classVersionMap = new TreeMap();
      Iterator jarIter = jarFiles.iterator();
View Full Code Here

      // Obtain the jars from the /lib
      HashSet jarFiles = new HashSet();
      File lib = new File(j2eeHome, "lib");
      buildJarSet(lib, jarFiles);
      URL[] cp = new URL[jarFiles.size()];
      jarFiles.toArray(cp);
      ClassLoader parent = Thread.currentThread().getContextClassLoader();
      URLClassLoader completeClasspath = new URLClassLoader(cp, parent);

      TreeMap classVersionMap = new TreeMap();
      Iterator jarIter = jarFiles.iterator();
View Full Code Here

   {
      String ejbName = bean.getEjbName();
      HashSet tmp = new HashSet();
      getInterfaces(iface, tmp);
      Class[] ifaces = new Class[tmp.size()];
      tmp.toArray(ifaces);
      for (int n = 0; n < ifaces.length; n++)
      {
         Class c = ifaces[n];
         Method[] methods = c.getDeclaredMethods();
         for (int m = 0; m < methods.length; m++)
View Full Code Here

      {
         log.warn("Could not get global URL[] from default loader repository!", e);
      } // end of try-catch
      log.trace("JSP CompileClasspath: " + tmp);
      String[] cp = new String[tmp.size()];
      tmp.toArray(cp);
      return cp;
   }

   private void addURLs(Set urlSet, URL[] urls)
   {
View Full Code Here

                    OsFamily parent = families[i];
                    queue.add(parent);
                }
            }
        }
        return (OsFamily[]) allFamilies.toArray(new OsFamily[allFamilies.size()]);
    }

    private static OsFamily determineOsFamily()
    {
        // Determine the most specific OS family
View Full Code Here

                }
            }
        }
        if (elems.size() > 0)
        {
            return (ConfigurationElement[])elems.toArray(new ConfigurationElement[elems.size()]);
        }
        return null;
    }

    /**
 
View Full Code Here

                exceptions.add(ex);
            }
        }
        if (!exceptions.isEmpty())
        {
            throw new JDOUserException(LOCALISER_JDO.msg("012002"),(Throwable[])exceptions.toArray(new Throwable[exceptions.size()]));
        }

        // Let superclass close its resources
        super.close();
    }
View Full Code Here

            if (!validated)
            {
                // Why is this wrapping all exceptions into 1 single exception?
                // This needs coordinating with the test expectations in the enhancer unit tests.
                throw new JPOXUserException(LOCALISER_API.msg("019016", obj_cls.getName()),
                    (Throwable[]) errors.toArray(new Throwable[errors.size()]));
            }
        }
    }

    /**
 
View Full Code Here

            {
                results.add(fgmd);
            }
        }
        FetchGroupMetaData[] result = new FetchGroupMetaData[results.size()];
        results.toArray(result);
        return result;
    }

    /**
     * Accessor for the fetch group metadata for the group specified.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.