public class ClassLoadConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
ClassLoadConfig.ClassLoaderContext
Wraps the preferred, caller and context class loaders.
|
| Modifier and Type | Field and Description |
|---|---|
protected ClassLoadConfig.ClassLoaderContext |
context |
| Constructor and Description |
|---|
ClassLoadConfig()
Construct with the default classLoader search with context classLoader first.
|
ClassLoadConfig(ClassLoader classLoader)
Specify the classLoader to use for class detection and new instance creation.
|
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
forName(String name)
Load a class taking into account a context class loader (if present).
|
ClassLoader |
getClassLoader()
Return the classLoader to use for service loading etc.
|
Enumeration<URL> |
getResources(String name)
Return the resources for the given name.
|
boolean |
isJacksonAnnotationsPresent()
Return true if Jackson annotations like JsonIgnore are present.
|
boolean |
isJacksonObjectMapperPresent()
Return true if Jackson ObjectMapper is present.
|
boolean |
isJava7Present()
Return true if Java7 is present.
|
boolean |
isJavaTimePresent()
Return true if the Java.time types are available and should be supported.
|
boolean |
isJavaxValidationAnnotationsPresent()
Return true if javax validation annotations like Size and NotNull are present.
|
boolean |
isJodaTimePresent()
Return true if the Joda types are available and should be supported.
|
protected boolean |
isPresent(String className)
Return true if the given class is present.
|
Object |
newInstance(String className)
Return a new instance of the class using the default constructor.
|
protected final ClassLoadConfig.ClassLoaderContext context
public ClassLoadConfig()
public ClassLoadConfig(ClassLoader classLoader)
public boolean isJavaTimePresent()
public boolean isJava7Present()
public boolean isJodaTimePresent()
public boolean isJavaxValidationAnnotationsPresent()
public boolean isJacksonAnnotationsPresent()
public boolean isJacksonObjectMapperPresent()
public Object newInstance(String className)
public Enumeration<URL> getResources(String name) throws IOException
IOExceptionprotected Class<?> forName(String name) throws ClassNotFoundException
ClassNotFoundExceptionpublic ClassLoader getClassLoader()
Copyright © 2016. All rights reserved.