public class ResourceLocatorImpl extends Object
Constructor and Description |
---|
ResourceLocatorImpl() |
Modifier and Type | Method and Description |
---|---|
static void |
resetClassLoaderLoadWarningCount() |
static InputStream |
tryFindResourceAsStream(TreeLogger logger,
ResourceOracle resourceOracle,
String resourceName)
Returns an InputStream for the given resource as found in the ResourceOracle.
|
static URL |
tryFindResourceUrl(TreeLogger logger,
ResourceOracle resourceOracle,
String resourceName)
Returns a URL for the given resource as found in the ResourceOracle.
|
public static void resetClassLoaderLoadWarningCount()
public static InputStream tryFindResourceAsStream(TreeLogger logger, ResourceOracle resourceOracle, String resourceName)
Returns null if a resource is unavailable or the stream fails to open. Matching the ClassLoader.getResourceAsStream() semantic.
For backwards compatibility it will fallback on finding via ClassLoader and warn the user about the problems this can cause in per-file compiles.
Should only be used by internal Generators and only till ClassLoader fallback is deprecated.
public static URL tryFindResourceUrl(TreeLogger logger, ResourceOracle resourceOracle, String resourceName)
For backwards compatibility it will fallback on finding via ClassLoader and warn the user about the problems this can cause in per-file compiles.
Should only be used by internal Generators and only till ClassLoader fallback is deprecated.
Copyright © 2016. All rights reserved.