Package net.bytebuddy.dynamic.loading
Class ClassInjector.AbstractBase
- java.lang.Object
-
- net.bytebuddy.dynamic.loading.ClassInjector.AbstractBase
-
- All Implemented Interfaces:
ClassInjector
- Direct Known Subclasses:
ClassInjector.UsingInstrumentation,ClassInjector.UsingJna,ClassInjector.UsingLookup,ClassInjector.UsingReflection,ClassInjector.UsingUnsafe
- Enclosing interface:
- ClassInjector
public abstract static class ClassInjector.AbstractBase extends java.lang.Object implements ClassInjector
An abstract base implementation of a class injector.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassInjector
ClassInjector.AbstractBase, ClassInjector.UsingInstrumentation, ClassInjector.UsingJna, ClassInjector.UsingLookup, ClassInjector.UsingReflection, ClassInjector.UsingUnsafe
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.security.PermissionSUPPRESS_ACCESS_CHECKSA permission for thesuppressAccessCheckspermission ornullif not supported.-
Fields inherited from interface net.bytebuddy.dynamic.loading.ClassInjector
ALLOW_EXISTING_TYPES
-
-
Constructor Summary
Constructors Constructor Description AbstractBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<TypeDescription,java.lang.Class<?>>inject(java.util.Map<? extends TypeDescription,byte[]> types)Injects the given types into the represented class loader.java.util.Map<TypeDescription,java.lang.Class<?>>inject(java.util.Set<? extends TypeDescription> types, ClassFileLocator classFileLocator)Injects the given types into the represented class loader.java.util.Map<java.lang.String,java.lang.Class<?>>injectRaw(java.util.Map<java.lang.String,byte[]> types)Injects the given types into the represented class loader.private static java.security.PermissiontoSuppressAccessChecks()Returns a permission for thesuppressAccessCheckspermission ornullif not supported.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.dynamic.loading.ClassInjector
injectRaw, isAlive
-
-
-
-
Field Detail
-
SUPPRESS_ACCESS_CHECKS
@MaybeNull protected static final java.security.Permission SUPPRESS_ACCESS_CHECKS
A permission for thesuppressAccessCheckspermission ornullif not supported.
-
-
Method Detail
-
toSuppressAccessChecks
@MaybeNull private static java.security.Permission toSuppressAccessChecks()
Returns a permission for thesuppressAccessCheckspermission ornullif not supported.- Returns:
- A permission for the
suppressAccessCheckspermission ornullif not supported.
-
inject
public java.util.Map<TypeDescription,java.lang.Class<?>> inject(java.util.Set<? extends TypeDescription> types, ClassFileLocator classFileLocator)
Injects the given types into the represented class loader.- Specified by:
injectin interfaceClassInjector- Parameters:
types- The types to load via injection.classFileLocator- The class file locator to use for resolving binary representations.- Returns:
- The loaded types that were passed as arguments.
-
inject
public java.util.Map<TypeDescription,java.lang.Class<?>> inject(java.util.Map<? extends TypeDescription,byte[]> types)
Injects the given types into the represented class loader.- Specified by:
injectin interfaceClassInjector- Parameters:
types- The types to load via injection.- Returns:
- The loaded types that were passed as arguments.
-
injectRaw
public java.util.Map<java.lang.String,java.lang.Class<?>> injectRaw(java.util.Map<java.lang.String,byte[]> types)
Injects the given types into the represented class loader.- Specified by:
injectRawin interfaceClassInjector- Parameters:
types- The names of the type to load via injection.- Returns:
- The loaded types that were passed as arguments.
-
-