Package net.bytebuddy.dynamic.loading
Class ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction
java.lang.Object
net.bytebuddy.dynamic.loading.ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction
- All Implemented Interfaces:
PrivilegedAction<URL>
- Enclosing class:
ByteArrayClassLoader.PersistenceHandler
@Enhance
protected static class ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction
extends Object
implements PrivilegedAction<URL>
An action to define a URL that represents a class file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A stream handler that returns the given binary representation.protected static interface
A dispatcher for interacting withURL
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
The binary representation of the type's class file.private static final ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction.Dispatcher
A dispatcher for creating URLs.private static final String
The URL's encoding character set.private static final String
Indicates that Byte Buddy's URLs do not have a file segment.private static final int
A value to define a standard port as Byte Buddy's URLs do not represent a port.private final String
The name of the type that this URL represents. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UrlDefinitionAction
(String typeName, byte[] binaryRepresentation) Creates a new URL definition action. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> T
doPrivileged
(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivileged
that is activated if available.run()
-
Field Details
-
DISPATCHER
private static final ByteArrayClassLoader.PersistenceHandler.UrlDefinitionAction.Dispatcher DISPATCHERA dispatcher for creating URLs. -
ENCODING
The URL's encoding character set.- See Also:
-
NO_PORT
private static final int NO_PORTA value to define a standard port as Byte Buddy's URLs do not represent a port.- See Also:
-
NO_FILE
Indicates that Byte Buddy's URLs do not have a file segment.- See Also:
-
typeName
The name of the type that this URL represents. -
binaryRepresentation
private final byte[] binaryRepresentationThe binary representation of the type's class file.
-
-
Constructor Details
-
UrlDefinitionAction
Creates a new URL definition action.- Parameters:
typeName
- The name of the type that this URL represents.binaryRepresentation
- The binary representation of the type's class file.
-
-
Method Details
-
doPrivileged
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
run
- Specified by:
run
in interfacePrivilegedAction<URL>
-