public class LambdaFactoryConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Optional<JavaCompiler> |
DEFAULT_COMPILER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static LambdaFactoryConfiguration |
get() |
ClassFactory |
getClassFactory() |
String |
getCompilationClassPath() |
HelperClassSourceProvider |
getDefaultHelperClassSourceProvider() |
List<String> |
getImports() |
JavaCompiler |
getJavaCompiler() |
ClassLoader |
getParentClassLoader() |
List<String> |
getStaticImports() |
int |
hashCode() |
LambdaFactoryConfiguration |
withClassFactory(ClassFactory classFactory)
Changes classFactory which is responsible for compiling the helper class and loading it into the memory.
|
LambdaFactoryConfiguration |
withCompilationClassPath(String compilationClassPath)
Overrides default compilation classpath (default is taken from the java.class.path system property).
|
LambdaFactoryConfiguration |
withHelperClassSourceProvider(HelperClassSourceProvider helperSourceProvider)
Changes helperClassSourceProvider which provides a code template for the class to be compiled.
|
LambdaFactoryConfiguration |
withImports(Class<?>... newImports)
Adds imports that will be visible in the lambda code.
|
LambdaFactoryConfiguration |
withImports(String... newImports)
Adds imports that will be visible in the lambda code.
|
LambdaFactoryConfiguration |
withJavaCompiler(JavaCompiler javaCompiler)
Overrides default JavaCompiler instance.
|
LambdaFactoryConfiguration |
withParentClassLoader(ClassLoader parentClassLoader)
Overrides default parent class loader (by default a class loader loading this class is used).
|
LambdaFactoryConfiguration |
withStaticImports(String... newStaticImports)
Adds static imports that will be visible in the lambda code.
|
protected static Optional<JavaCompiler> DEFAULT_COMPILER
public static LambdaFactoryConfiguration get()
public HelperClassSourceProvider getDefaultHelperClassSourceProvider()
public ClassFactory getClassFactory()
public String getCompilationClassPath()
public ClassLoader getParentClassLoader()
public JavaCompiler getJavaCompiler()
public LambdaFactoryConfiguration withHelperClassSourceProvider(HelperClassSourceProvider helperSourceProvider)
public LambdaFactoryConfiguration withClassFactory(ClassFactory classFactory)
public LambdaFactoryConfiguration withStaticImports(String... newStaticImports)
public LambdaFactoryConfiguration withImports(String... newImports)
public LambdaFactoryConfiguration withImports(Class<?>... newImports)
withImports(String...).public LambdaFactoryConfiguration withCompilationClassPath(String compilationClassPath)
withParentClassLoader(ClassLoader)
so that it can load classes provided in the given class path.public LambdaFactoryConfiguration withParentClassLoader(ClassLoader parentClassLoader)
public LambdaFactoryConfiguration withJavaCompiler(JavaCompiler javaCompiler)
withClassFactory(ClassFactory)).Copyright © 2016. All rights reserved.