Package io.ebean.config
Class ClassLoadConfig
java.lang.Object
io.ebean.config.ClassLoadConfig
public class ClassLoadConfig extends Object
Helper to find classes taking into account the context class loader.
-
Constructor Summary
Constructors Constructor 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. -
Method Summary
Modifier and Type Method Description 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
isJacksonCorePresent()
boolean
isJacksonObjectMapperPresent()
Return true if Jackson ObjectMapper is present.boolean
isJakartaValidationAnnotationsPresent()
Return true if jakarta validation annotations like Size and NotNull are present.boolean
isJavaxPostConstructPresent()
Return true if javax PostConstruct annotation is present (maybe not in java9).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.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.
-
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
Return true if the Joda types are available and should be supported. -
isJavaxValidationAnnotationsPresent
Return true if javax validation annotations like Size and NotNull are present. -
isJakartaValidationAnnotationsPresent
Return true if jakarta validation annotations like Size and NotNull are present. -
isJavaxPostConstructPresent
Return true if javax PostConstruct annotation is present (maybe not in java9). If not we don't support PostConstruct lifecycle events. -
isJacksonAnnotationsPresent
Return true if Jackson annotations like JsonIgnore are present. -
isJacksonCorePresent
-
isJacksonObjectMapperPresent
Return true if Jackson ObjectMapper is present. -
newInstance
Return a new instance of the class using the default constructor. -
getResources
Return the resources for the given name.- Throws:
IOException
-
isPresent
Return true if the given class is present. -
getClassLoader
Return the classLoader to use for service loading etc.
-