Tabnine Logo
Resource.getURL
Code IndexAdd Tabnine to your IDE (free)

How to use
getURL
method
in
org.jboss.modules.Resource

Best Java code snippets using org.jboss.modules.Resource.getURL (Showing top 16 results out of 315)

origin: wildfly/wildfly

if(resource.getURL().toString().contains("com/sun/jsf-impl/main")) {
  continue;
    continue;
  if(resource.getURL().getProtocol().equals("vfs")) {
    continue;
origin: org.projectodd/polyglot-core

public static ResourceLoaderSpec createLoaderSpec(Resource resource) throws IOException {
  try {
    
    return createLoaderSpec( VFS.getChild( resource.getURL().toURI() ) );
  } catch (URISyntaxException e) {
    //ffs
    e.printStackTrace();
    
    return null;
  }
}

origin: org.jboss.modules/jboss-modules

/**
 * Load a local exported resource from this class loader.
 *
 * @param name the resource name
 * @return the list of resources
 */
public List<Resource> loadResourceLocal(final String name) {
  final Map<String, List<ResourceLoader>> paths = this.paths.get().getAllPaths();
  final String path = Module.pathOf(name);
  final URLConnectionResource jaxpResource = jaxpImplResources.get(name);
  final List<ResourceLoader> loaders = paths.get(path);
  final List<Resource> list = new ArrayList<Resource>(loaders == null ? 1 : loaders.size());
  if (loaders != null) {
    for (ResourceLoader loader : loaders) {
      final Resource resource = loader.getResource(name);
      if (resource != null) {
        if (jaxpResource != null) Module.log.jaxpResourceLoaded(resource.getURL(), module);
        list.add(resource);
      }
    }
  }
  return list.isEmpty() ? Collections.emptyList() : list;
}
origin: org.hawkular.bus/hawkular-bus-broker-wf-extension

  Module module = Module.forClass(getClass());
  Resource r = module.getExportedResource("config", configFile);
  return r.getURL().toString();
} catch (Throwable t) {
origin: org.jboss.modules/jboss-modules

/**
 * Load a local exported resource from a specific root from this module class loader.
 *
 * @param root the root name
 * @param name the resource name
 * @return the resource, or {@code null} if it was not found
 */
@Deprecated
Resource loadResourceLocal(final String root, final String name) {
  final Map<String, List<ResourceLoader>> paths = this.paths.get().getAllPaths();
  final String path = Module.pathOf(name);
  final URLConnectionResource jaxpResource = jaxpImplResources.get(name);
  final List<ResourceLoader> loaders = paths.get(path);
  if (loaders != null) {
    for (ResourceLoader loader : loaders) {
      if (root.equals(loader.getRootName())) {
        final Resource resource = loader.getResource(name);
        if (jaxpResource != null) Module.log.jaxpResourceLoaded(resource.getURL(), module);
        return resource;
      }
    }
  }
  return null;
}
origin: io.thorntail/management-console

@Produces
public Archive managementConsoleWar() throws Exception {
  // Load the management-ui webjars.
  WARArchive war = ShrinkWrap.create(WARArchive.class, "management-console-ui.war");
  Module module = Module.getBootModuleLoader().loadModule("org.jboss.as.console");
  Iterator<Resource> resources = module.globResources("*");
  while (resources.hasNext()) {
    Resource each = resources.next();
    war.add(new UrlAsset(each.getURL()), each.getName());
  }
  war.setContextRoot(this.fraction.contextRoot());
  return war;
}
origin: fakereplace/fakereplace

  ret.add(new ZipJavaFileObject(org.fakereplace.util.FileReader.readFileBytes(res.openStream()), binaryName, res.getURL().toURI()));
} catch (URISyntaxException e) {
  e.printStackTrace();
origin: org.jboss.forge/jboss-modules

  final List<Resource> resourceList = loader.loadResourceLocal(canonPath);
  for (Resource resource : resourceList) {
    list.add(resource.getURL());
final List<Resource> resourceList = fallbackLoader.loadResourceLocal(canonPath);
for (Resource resource : resourceList) {
  list.add(resource.getURL());
origin: org.wildfly.core/wildfly-server

private Index calculateModuleIndex(final Module module) throws ModuleLoadException, IOException {
  final Indexer indexer = new Indexer();
  final PathFilter filter = PathFilters.getDefaultImportFilter();
  final Iterator<Resource> iterator = module.iterateResources(filter);
  while (iterator.hasNext()) {
    Resource resource = iterator.next();
    if(resource.getName().endsWith(".class")) {
      try (InputStream in = resource.openStream()) {
        indexer.index(in);
      } catch (Exception e) {
        ServerLogger.DEPLOYMENT_LOGGER.cannotIndexClass(resource.getName(), resource.getURL().toExternalForm(), e);
      }
    }
  }
  return indexer.complete();
}
origin: wildfly/wildfly-core

private Index calculateModuleIndex(final Module module) throws ModuleLoadException, IOException {
  final Indexer indexer = new Indexer();
  final PathFilter filter = PathFilters.getDefaultImportFilter();
  final Iterator<Resource> iterator = module.iterateResources(filter);
  while (iterator.hasNext()) {
    Resource resource = iterator.next();
    if(resource.getName().endsWith(".class")) {
      try (InputStream in = resource.openStream()) {
        indexer.index(in);
      } catch (Exception e) {
        ServerLogger.DEPLOYMENT_LOGGER.cannotIndexClass(resource.getName(), resource.getURL().toExternalForm(), e);
      }
    }
  }
  return indexer.complete();
}
origin: org.jboss.modules/jboss-modules

  final Iterator<Resource> iterator = loader.loadResourceLocal(canonPath).iterator();
  if (iterator.hasNext()) {
    final URL url = iterator.next().getURL();
    if (jaxpResource != null) log.jaxpResourceLoaded(url, this);
    return url;
final Iterator<Resource> iterator = fallbackLoader.loadResourceLocal(canonPath).iterator();
if (iterator.hasNext()) {
  final URL url = iterator.next().getURL();
  if (jaxpResource != null) log.jaxpResourceLoaded(url, this);
  return url;
origin: org.jboss.forge/jboss-modules

  final List<Resource> resourceList = loader.loadResourceLocal(canonPath);
  for (Resource resource : resourceList) {
    return resource.getURL();
final List<Resource> resourceList = fallbackLoader.loadResourceLocal(canonPath);
for (Resource resource : resourceList) {
  return resource.getURL();
origin: org.jboss.modules/jboss-modules

  final List<Resource> resourceList = loader.loadResourceLocal(canonPath);
  for (Resource resource : resourceList) {
    final URL url = resource.getURL();
    if (jaxpResource != null) log.jaxpResourceLoaded(url, this);
    list.add(url);
final List<Resource> resourceList = fallbackLoader.loadResourceLocal(canonPath);
for (Resource resource : resourceList) {
  final URL url = resource.getURL();
  if (jaxpResource != null) log.jaxpResourceLoaded(url, this);
  list.add(url);
origin: org.jboss.modules/jboss-modules

  if (iterator.hasNext()) {
    final Resource resource = iterator.next();
    if (jaxpResource != null) log.jaxpResourceLoaded(resource.getURL(), this);
    return resource.openStream();
if (iterator.hasNext()) {
  final Resource resource = iterator.next();
  if (jaxpResource != null) log.jaxpResourceLoaded(resource.getURL(), this);
  return resource.openStream();
origin: org.wildfly/wildfly-undertow

if(resource.getURL().toString().contains("com/sun/jsf-impl/main")) {
  continue;
    continue;
  if(resource.getURL().getProtocol().equals("vfs")) {
    continue;
origin: org.jboss.eap/wildfly-undertow

if(resource.getURL().toString().contains("com/sun/jsf-impl/main")) {
  continue;
    continue;
  if(resource.getURL().getProtocol().equals("vfs")) {
    continue;
org.jboss.modulesResourcegetURL

Javadoc

Get the complete URL of this resource.

Popular methods of Resource

  • getName
    Get the relative resource name.
  • openStream
    Open an input stream to this resource.

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Permission (java.security)
    Legacy security code; do not use.
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now