Class TestSystemFactory
- java.lang.Object
-
- liquibase.plugin.AbstractPluginFactory<TestSystem>
-
- liquibase.extension.testing.testsystem.TestSystemFactory
-
- All Implemented Interfaces:
PluginFactory,SingletonObject
public class TestSystemFactory extends AbstractPluginFactory<TestSystem>
Factory for gettingTestSystemimplementations.
-
-
Constructor Summary
Constructors Constructor Description TestSystemFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<TestSystem>findAllInstances()Finds implementations of the given interface or class and returns instances of them.<T extends TestSystem>
List<T>getAvailable(Class<T> testSystemType)protected Class<TestSystem>getPluginClass()protected intgetPriority(TestSystem testSystem, Object... args)Returns the priority of the given object based on the passed args array.TestSystemgetTestSystem(String definition)Convenience method forgetTestSystem(TestSystem.Definition)without having to parse the definition yourself.TestSystemgetTestSystem(TestSystem.Definition definition)Return theTestSystemfor the givenTestSystem.Definition.Set<String>getTestSystemNames()-
Methods inherited from class liquibase.plugin.AbstractPluginFactory
getPlugin, getPlugins, register, removeInstance
-
-
-
-
Method Detail
-
getPluginClass
protected Class<TestSystem> getPluginClass()
- Specified by:
getPluginClassin classAbstractPluginFactory<TestSystem>
-
getPriority
protected int getPriority(TestSystem testSystem, Object... args)
Description copied from class:AbstractPluginFactoryReturns the priority of the given object based on the passed args array. The args are created as part of the custom public getPlugin method in implementations are passed throughAbstractPluginFactory.getPlugin(Object...)- Specified by:
getPriorityin classAbstractPluginFactory<TestSystem>
-
getTestSystem
public TestSystem getTestSystem(TestSystem.Definition definition)
Return theTestSystemfor the givenTestSystem.Definition. Returns singleton instances for equal definitions.
-
getTestSystem
public TestSystem getTestSystem(String definition)
Convenience method forgetTestSystem(TestSystem.Definition)without having to parse the definition yourself.
-
findAllInstances
protected Collection<TestSystem> findAllInstances()
Description copied from class:AbstractPluginFactoryFinds implementations of the given interface or class and returns instances of them. Standard implementation usesServiceLoaderto find implementations and caches results inAbstractPluginFactory.allInstanceswhich means the same objects are always returned. If the instances should not be treated as singletons, clone the objects before returning them fromAbstractPluginFactory.getPlugin(Object...).- Overrides:
findAllInstancesin classAbstractPluginFactory<TestSystem>
-
getAvailable
public <T extends TestSystem> List<T> getAvailable(Class<T> testSystemType)
-
-