List of usage examples for org.apache.commons.collections.bag HashBag getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.jboss.as.test.integration.osgi.ear.CollectionsServlet.java
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { HashBag bag = new HashBag(); ModuleClassLoader classLoader = (ModuleClassLoader) bag.getClass().getClassLoader(); String source = classLoader.getModule().getIdentifier().toString(); if (classLoader instanceof BundleReference) { source = ((BundleReference) classLoader).getBundle().toString(); }/*from w w w . j a v a 2 s . c o m*/ Writer writer = resp.getWriter(); writer.write(HashBag.class.getSimpleName() + " loaded from " + source); }