Package net.bytebuddy.dynamic.loading
Interface ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction.Dispatcher
-
- Enclosing class:
- ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction
@Proxied("java.net.URL") protected static interface ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction.Dispatcher
A dispatcher for interacting withURL
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.URL
make(java.lang.String protocol, java.lang.String host, int port, java.lang.String file, java.net.URLStreamHandler handler)
Creates aURL
.java.net.URL
of(java.net.URI uri, java.net.URLStreamHandler handler)
Resolves a URL from an URI, if possible.
-
-
-
Method Detail
-
make
@IsConstructor java.net.URL make(java.lang.String protocol, java.lang.String host, int port, java.lang.String file, java.net.URLStreamHandler handler) throws java.net.MalformedURLException
Creates aURL
.- Parameters:
protocol
- The URL's protocol.host
- The host on the URL.port
- The port on the URL or a negative value if no port is defined.file
- The file on the URL.handler
- The stream handler to use.- Returns:
- An appropriate URL.
- Throws:
java.net.MalformedURLException
- If the supplied URL is malformed.
-
of
@MaybeNull @IsStatic @Defaults java.net.URL of(java.net.URI uri, java.net.URLStreamHandler handler) throws java.net.MalformedURLException
Resolves a URL from an URI, if possible.- Parameters:
uri
- The URI to represent.handler
- The stream handler to attach to that URL.- Returns:
- An appropriate URL.
- Throws:
java.net.MalformedURLException
- If the supplied URL is malformed.
-
-