congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ChainingClassLoader.getAlternativeResourceName
Code IndexAdd Tabnine to your IDE (free)

How to use
getAlternativeResourceName
method
in
com.atlassian.plugin.util.ChainingClassLoader

Best Java code snippets using com.atlassian.plugin.util.ChainingClassLoader.getAlternativeResourceName (Showing top 3 results out of 315)

origin: com.atlassian.plugins/atlassian-plugins-core

@Override
public URL getResource(String name) {
  final String realResourceName = getAlternativeResourceName(name);
  for (ClassLoader classloader : classLoaders) {
    final URL url = classloader.getResource(realResourceName);
    if (url != null) {
      return url;
    }
  }
  return null;
}
origin: com.atlassian.plugins/atlassian-plugins-core

@Override
public Enumeration<URL> getResources(String name) throws IOException {
  return new ResourcesEnumeration(getAlternativeResourceName(name), classLoaders);
}
origin: com.atlassian.plugins/atlassian-plugins-core

@Override
public InputStream getResourceAsStream(String name) {
  final String realResourceName = getAlternativeResourceName(name);
  for (ClassLoader classloader : classLoaders) {
    final InputStream inputStream = classloader.getResourceAsStream(realResourceName);
    if (inputStream != null) {
      return inputStream;
    }
  }
  if (!name.equals(realResourceName)) {
    //looks like we didn't find anything with the alternate resourcename. Lets fall back to the
    //original resource name!
    log.debug("No resource found with alternate resourceName '{}'. Falling back to original name '{}'.", realResourceName, name);
    for (ClassLoader classloader : classLoaders) {
      final InputStream inputStream = classloader.getResourceAsStream(name);
      if (inputStream != null) {
        return inputStream;
      }
    }
  }
  return null;
}
com.atlassian.plugin.utilChainingClassLoadergetAlternativeResourceName

Popular methods of ChainingClassLoader

  • <init>
    Constructs a chaining classloader

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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