Top Description Fields Constructors Methods
io.vertx.core.impl.verticle

public Class CompilingClassLoader

extends ClassLoader
Class Inheritance
Imports
io.vertx.core.impl.logging.Logger, .LoggerFactory, javax.tools.Diagnostic, .DiagnosticCollector, .JavaCompiler, .JavaFileObject, .JavaFileObject.Kind, .StandardJavaFileManager, .StandardLocation, .ToolProvider, java.io.File, java.net.URL, java.util.ArrayList, .Collections, .List

Classloader for dynamic .java source file compilation and loading.
Author
Janne Hietamäki

Field Summary

Modifier and TypeField and Description
private static final List<String>
private final MemoryFileManager
private static final String
private final JavaSourceContext
private static final Logger

Constructor Summary

AccessConstructor and Description
public

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.

public byte[]
public String
Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindLibraryfindLoadedClassfindResourcefindResourcefindResourcesfindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourcegetResourceAsStreamgetResourcesgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Field Detail

COMPILER_OPTIONSback to summary
private static final List<String> COMPILER_OPTIONS
fileManagerback to summary
private final MemoryFileManager fileManager
JAVA_COMPILER_OPTIONS_PROP_NAMEback to summary
private static final String JAVA_COMPILER_OPTIONS_PROP_NAME
javaSourceContextback to summary
private final JavaSourceContext javaSourceContext
logback to summary
private static final Logger log

Constructor Detail

CompilingClassLoaderback to summary
public CompilingClassLoader(ClassLoader loader, String sourceName)

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
getClassBytesback to summary
public byte[] getClassBytes(String name)
resolveMainClassNameback to summary
public String resolveMainClassName()