Top Constructors Methods
liquibase.util

public final Class OsgiUtil

extends Object
Class Inheritance
Imports
java.util.List, java.util.stream.Collectors, liquibase.osgi.Activator, .Activator.LiquibaseBundle

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static boolean

Returns:

true if the class is allowed, false otherwise
isClassAllowed
(Activator.LiquibaseBundle
the LiquibaseBundle instance containing the configuration for the allowed packages
liquibaseBundle
,
Class<T>
the class to check
clazz
)

Checks whether a given class is allowed according to the configuration of the provided LiquibaseBundle.

public static <
the type of the class to load
T
>
Class<T>

Returns:

the loaded class
loadClass
(String
the name of the class to load
className
)

Tries to load a class under OSGI environment.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OsgiUtilback to summary
private OsgiUtil()

Method Detail

isClassAllowedback to summary
private static boolean isClassAllowed(Activator.LiquibaseBundle liquibaseBundle, Class<T> clazz)

Checks whether a given class is allowed according to the configuration of the provided LiquibaseBundle.

Parameters
liquibaseBundle:Activator.LiquibaseBundle

the LiquibaseBundle instance containing the configuration for the allowed packages

clazz:Class<T>

the class to check

Returns:boolean

true if the class is allowed, false otherwise

Exceptions
ClassNotFoundException:
if the class is not found
loadClassback to summary
public static <T> Class<T> loadClass(String className) throws ClassNotFoundException

Tries to load a class under OSGI environment. It will attempt to load the class from all Liquibase bundles registered via Activator.

Parameters
<T>
the type of the class to load
className:String

the name of the class to load

Returns:Class<T>

the loaded class

Exceptions
ClassNotFoundException:
if the class could not be found