java.lang.Object
io.ebean.config.ClassLoadConfig
Helper to find classes taking into account the context class loader.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Wraps the preferred, caller and context class loaders. -
Field Summary
-
Constructor Summary
ConstructorDescriptionConstruct with the default classLoader search with context classLoader first.ClassLoadConfig
(ClassLoader classLoader) Specify the classLoader to use for class detection and new instance creation. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<?>
Load a class taking into account a context class loader (if present).Return the classLoader to use for service loading etc.boolean
Return true if Jackson annotations like JsonIgnore are present.boolean
boolean
Return true if Jackson ObjectMapper is present.boolean
Return true if jakarta validation annotations like Size and NotNull are present.boolean
Return true if javax PostConstruct annotation is present (maybe not in java9).boolean
Return true if javax validation annotations like Size and NotNull are present.boolean
Return true if the Joda types are available and should be supported.boolean
Return true if the given class is present.newInstance
(String className) Return a new instance of the class using the default constructor.
-
Field Details
-
context
-
-
Constructor Details
-
ClassLoadConfig
public ClassLoadConfig()Construct with the default classLoader search with context classLoader first. -
ClassLoadConfig
Specify the classLoader to use for class detection and new instance creation.
-
-
Method Details
-
isJodaTimePresent
public boolean isJodaTimePresent()Return true if the Joda types are available and should be supported. -
isJavaxValidationAnnotationsPresent
public boolean isJavaxValidationAnnotationsPresent()Return true if javax validation annotations like Size and NotNull are present. -
isJakartaValidationAnnotationsPresent
public boolean isJakartaValidationAnnotationsPresent()Return true if jakarta validation annotations like Size and NotNull are present. -
isJavaxPostConstructPresent
public boolean isJavaxPostConstructPresent()Return true if javax PostConstruct annotation is present (maybe not in java9). If not we don't support PostConstruct lifecycle events. -
isJacksonAnnotationsPresent
public boolean isJacksonAnnotationsPresent()Return true if Jackson annotations like JsonIgnore are present. -
isJacksonCorePresent
public boolean isJacksonCorePresent() -
isJacksonObjectMapperPresent
public boolean isJacksonObjectMapperPresent()Return true if Jackson ObjectMapper is present. -
newInstance
Return a new instance of the class using the default constructor. -
isPresent
Return true if the given class is present. -
forName
Load a class taking into account a context class loader (if present).- Throws:
ClassNotFoundException
-
getClassLoader
Return the classLoader to use for service loading etc.
-