Top Inners Fields Constructors Methods
org.assertj.core.api

pack-priv Class ClassLoadingStrategyFactory

extends Object
Class Inheritance
Imports
java.io.IOException, java.lang.invoke.MethodHandles, java.lang.reflect.Method, java.net.URL, java.util.Enumeration, .LinkedHashMap, .Map, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.dynamic.loading.ClassInjector, .ClassLoadingStrategy

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final ClassLoader
private static final MethodHandles.Lookup
private static final Method

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static ClassLoadingStrategyFactory.ClassLoadingStrategyPair
classLoadingStrategy(Class<?> assertClass)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ASSERTJ_CLASS_LOADERback to summary
pack-priv static final ClassLoader ASSERTJ_CLASS_LOADER
LOOKUPback to summary
private static final MethodHandles.Lookup LOOKUP
PRIVATE_LOOKUP_INback to summary
private static final Method PRIVATE_LOOKUP_IN

Constructor Detail

ClassLoadingStrategyFactoryback to summary
pack-priv ClassLoadingStrategyFactory()

Method Detail

classLoadingStrategyback to summary
pack-priv static ClassLoadingStrategyFactory.ClassLoadingStrategyPair classLoadingStrategy(Class<?> assertClass)
org.assertj.core.api back to summary

pack-priv Class ClassLoadingStrategyFactory.ClassLoadingStrategyPair

extends Object
Class Inheritance
  • java.lang.Object
  • org.assertj.core.api.ClassLoadingStrategyFactory.ClassLoadingStrategyPair

Field Summary

Modifier and TypeField and Description
private final ClassLoader
private final ClassLoadingStrategy<ClassLoader>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv ClassLoader
pack-priv ClassLoadingStrategy<ClassLoader>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classLoaderback to summary
private final ClassLoader classLoader
classLoadingStrategyback to summary
private final ClassLoadingStrategy<ClassLoader> classLoadingStrategy

Constructor Detail

ClassLoadingStrategyPairback to summary
pack-priv ClassLoadingStrategyPair(ClassLoader classLoader, ClassLoadingStrategy<ClassLoader> classLoadingStrategy)

Method Detail

getClassLoaderback to summary
pack-priv ClassLoader getClassLoader()
getClassLoadingStrategyback to summary
pack-priv ClassLoadingStrategy<ClassLoader> getClassLoadingStrategy()
org.assertj.core.api back to summary

pack-priv Class ClassLoadingStrategyFactory.CompositeClassLoader

extends ClassLoader
implements ClassLoadingStrategy<ClassLoader>
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.loading.ClassLoadingStrategy

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected Class<?>
findClass(String
The binary name of the class
name
)

Overrides java.lang.ClassLoader.findClass.

Finds the class with the specified binary name.
protected URL
findResource(String
The resource name
name
)

Overrides java.lang.ClassLoader.findResource.

Finds the resource with the given name.
protected Enumeration<URL>
findResources(String
The resource name
name
)

Overrides java.lang.ClassLoader.findResources.

Returns an enumeration of URL objects representing all the resources with the given name.
public Map<TypeDescription, Class<?>>
load(ClassLoader
The class loader to used for loading the classes.
classLoader
,
Map<TypeDescription, byte[]>
Byte array representations of the types to be loaded mapped by their descriptions, where an iteration order defines an order in which they are supposed to be loaded, if relevant.
types
)

Implements net.bytebuddy.dynamic.loading.ClassLoadingStrategy.load.

Loads a given collection of classes given their binary representation.
Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindLibraryfindLoadedClassfindResourcefindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourcegetResourceAsStreamgetResourcesgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Constructor Detail

CompositeClassLoaderback to summary
pack-priv CompositeClassLoader(ClassLoader parent)

Method Detail

findClassback to summary
protected Class<?> findClass(String name) throws ClassNotFoundException

Overrides java.lang.ClassLoader.findClass.

Doc from java.lang.ClassLoader.findClass.

Finds the class with the specified binary name. This method should be overridden by class loader implementations that follow the delegation model for loading classes, and will be invoked by the loadClass method after checking the parent class loader for the requested class.

Parameters
name:String

The binary name of the class

Returns:Class<?>

The resulting Class object

Annotations
@Override
Exceptions
ClassNotFoundException:
If the class could not be found
findResourceback to summary
protected URL findResource(String name)

Overrides java.lang.ClassLoader.findResource.

Doc from java.lang.ClassLoader.findResource.

Finds the resource with the given name. Class loader implementations should override this method.

For resources in named modules then the method must implement the rules for encapsulation specified in the Module getResourceAsStream method. Additionally, it must not find non-".class" resources in packages of named modules unless the package is opened unconditionally.

Parameters
name:String

The resource name

Returns:URL

URL object for reading the resource; null if the resource could not be found, a URL could not be constructed to locate the resource, the resource is in a package that is not opened unconditionally, or access to the resource is denied by the security manager.

Annotations
@Override
findResourcesback to summary
protected Enumeration<URL> findResources(String name) throws IOException

Overrides java.lang.ClassLoader.findResources.

Doc from java.lang.ClassLoader.findResources.

Returns an enumeration of URL objects representing all the resources with the given name. Class loader implementations should override this method.

For resources in named modules then the method must implement the rules for encapsulation specified in the Module getResourceAsStream method. Additionally, it must not find non-".class" resources in packages of named modules unless the package is opened unconditionally.

Parameters
name:String

The resource name

Returns:Enumeration<URL>

An enumeration of URL objects for the resource. If no resources could be found, the enumeration will be empty. Resources for which a URL cannot be constructed, are in a package that is not opened unconditionally, or access to the resource is denied by the security manager, are not returned in the enumeration.

Annotations
@Override
Exceptions
IOException:
If I/O errors occur
loadback to summary
public Map<TypeDescription, Class<?>> load(ClassLoader classLoader, Map<TypeDescription, byte[]> types)

Implements net.bytebuddy.dynamic.loading.ClassLoadingStrategy.load.

Doc from net.bytebuddy.dynamic.loading.ClassLoadingStrategy.load.

Loads a given collection of classes given their binary representation.

Parameters
classLoader:ClassLoader

The class loader to used for loading the classes.

types:Map<TypeDescription, byte[]>

Byte array representations of the types to be loaded mapped by their descriptions, where an iteration order defines an order in which they are supposed to be loaded, if relevant.

Returns:Map<TypeDescription, Class<?>>

A collection of the loaded classes which will be initialized in the iteration order of the returned collection.

Annotations
@Override