Top Description Inners Fields Constructors Methods
com.google.inject.internal.aop

pack-priv final Class ChildClassDefiner

extends Object
implements ClassDefiner
Class Inheritance
All Implemented Interfaces
com.google.inject.internal.aop.ClassDefiner
Imports
com.google.common.cache.CacheBuilder, .CacheLoader, .LoadingCache, java.security.AccessController, .PrivilegedAction, java.util.logging.Logger

ClassDefiner that defines classes using child ClassLoaders.
Author
[email protected] (Stuart McCulloch)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ChildClassDefiner.ChildLoader

Custom class loader that grants access to defineClass

private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static ChildClassDefiner.ChildLoader
childLoader(ClassLoader hostLoader)

Creates a child loader for the given host loader

public Class<?>
define(Class<?> hostClass, byte[] bytecode)

Implements com.google.inject.internal.aop.ClassDefiner.define.

Defines a new class relative to the host.
pack-priv static <T> T
doPrivileged(PrivilegedAction<T> action)

Utility method to remove doPrivileged ambiguity

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loggerback to summary
private static final Logger logger

Constructor Detail

ChildClassDefinerback to summary
pack-priv ChildClassDefiner()

Method Detail

childLoaderback to summary
pack-priv static ChildClassDefiner.ChildLoader childLoader(ClassLoader hostLoader)

Creates a child loader for the given host loader

defineback to summary
public Class<?> define(Class<?> hostClass, byte[] bytecode) throws Exception

Implements com.google.inject.internal.aop.ClassDefiner.define.

Doc from com.google.inject.internal.aop.ClassDefiner.define.

Defines a new class relative to the host.

Annotations
@Override
doPrivilegedback to summary
pack-priv static <T> T doPrivileged(PrivilegedAction<T> action)

Utility method to remove doPrivileged ambiguity

com.google.inject.internal.aop back to summary

private final Class ChildClassDefiner.ChildLoader

extends ClassLoader
Class Inheritance

Custom class loader that grants access to defineClass

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Class<?>
defineInChild(byte[] bytecode)

Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindClassfindLibraryfindLoadedClassfindResourcefindResourcefindResourcesfindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourcegetResourceAsStreamgetResourcesgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Constructor Detail

ChildLoaderback to summary
pack-priv ChildLoader(ClassLoader parent)
ChildLoaderback to summary
pack-priv ChildLoader()

Method Detail

defineInChildback to summary
pack-priv Class<?> defineInChild(byte[] bytecode)
com.google.inject.internal.aop back to summary

private Class ChildClassDefiner.ChildLoaderCacheHolder

extends Object
Class Inheritance
  • java.lang.Object
  • com.google.inject.internal.aop.ChildClassDefiner.ChildLoaderCacheHolder

Field Summary

Modifier and TypeField and Description
pack-priv static final LoadingCache<ClassLoader, ChildClassDefiner.ChildLoader>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHILD_LOADER_CACHEback to summary
pack-priv static final LoadingCache<ClassLoader, ChildClassDefiner.ChildLoader> CHILD_LOADER_CACHE

Constructor Detail

ChildLoaderCacheHolderback to summary
private ChildLoaderCacheHolder()
com.google.inject.internal.aop back to summary

private Class ChildClassDefiner.SystemChildLoaderHolder

extends Object
Class Inheritance
  • java.lang.Object
  • com.google.inject.internal.aop.ChildClassDefiner.SystemChildLoaderHolder

Field Summary

Modifier and TypeField and Description
pack-priv static final ChildClassDefiner.ChildLoader

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SYSTEM_CHILD_LOADERback to summary
pack-priv static final ChildClassDefiner.ChildLoader SYSTEM_CHILD_LOADER

Constructor Detail

SystemChildLoaderHolderback to summary
private SystemChildLoaderHolder()