com.sun.tools.javac.processing
Class ServiceProxy
java.lang.Object
com.sun.tools.javac.processing.ServiceProxy
class ServiceProxy
- extends java.lang.Object
Utility class to determine if a service can be found on the
path that might be used to create a class loader.
This is NOT part of any API supported by Sun Microsystems.
If you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
|
Field Summary |
private static java.lang.String |
prefix
|
|
Method Summary |
private static void |
fail(java.lang.Class<?> service,
java.lang.String msg)
|
private static void |
fail(java.lang.Class<?> service,
java.net.URL u,
int line,
java.lang.String msg)
|
static boolean |
hasService(java.lang.Class<?> service,
java.net.URL[] urls)
Return true if a description for at least one service is found in the
service configuration files in the given URLs. |
private static boolean |
parse(java.lang.Class<?> service,
java.net.URL u)
Parse the content of the given URL as a provider-configuration file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prefix
private static final java.lang.String prefix
- See Also:
- Constant Field Values
ServiceProxy
ServiceProxy()
fail
private static void fail(java.lang.Class<?> service,
java.lang.String msg)
throws ServiceProxy.ServiceConfigurationError
- Throws:
ServiceProxy.ServiceConfigurationError
fail
private static void fail(java.lang.Class<?> service,
java.net.URL u,
int line,
java.lang.String msg)
throws ServiceProxy.ServiceConfigurationError
- Throws:
ServiceProxy.ServiceConfigurationError
parse
private static boolean parse(java.lang.Class<?> service,
java.net.URL u)
throws ServiceProxy.ServiceConfigurationError
- Parse the content of the given URL as a provider-configuration file.
- Parameters:
service - The service class for which providers are being sought;
used to construct error detail stringsurl - The URL naming the configuration file to be parsed
- Returns:
- true if the name of a service is found
- Throws:
ServiceProxy.ServiceConfigurationError - If an I/O error occurs while reading from the given URL, or
if a configuration-file format error is detected
hasService
public static boolean hasService(java.lang.Class<?> service,
java.net.URL[] urls)
throws ServiceProxy.ServiceConfigurationError
- Return true if a description for at least one service is found in the
service configuration files in the given URLs.
- Throws:
ServiceProxy.ServiceConfigurationError