Package kieker.common.record.factory
Class StandardRecordFactoryProvider
java.lang.Object
kieker.common.record.factory.StandardRecordFactoryProvider
- All Implemented Interfaces:
IRecordFactoryProvider
public class StandardRecordFactoryProvider extends java.lang.Object implements IRecordFactoryProvider
This factory provider implements the default factory resolution strategy by appending "Factory" to the record class name
and loading the respective class.
- Since:
- 2.0
- Author:
- Holger Knoche
-
Constructor Summary
Constructors Constructor Description StandardRecordFactoryProvider()
-
Method Summary
Modifier and Type Method Description IRecordFactory<?>
createFactoryFor(java.lang.Class<?> recordClass)
Creates a factory for the given record class.boolean
isApplicableTo(java.lang.Class<?> recordClass)
Denotes whether this factory provider is applicable to the given record class.
-
Constructor Details
-
StandardRecordFactoryProvider
public StandardRecordFactoryProvider()
-
-
Method Details
-
isApplicableTo
public boolean isApplicableTo(java.lang.Class<?> recordClass)Description copied from interface:IRecordFactoryProvider
Denotes whether this factory provider is applicable to the given record class.- Specified by:
isApplicableTo
in interfaceIRecordFactoryProvider
- Parameters:
recordClass
- The record class in question- Returns:
True
when this provider is applicable for the given class,false
otherwise
-
createFactoryFor
Description copied from interface:IRecordFactoryProvider
Creates a factory for the given record class. This method may only be called ifIRecordFactoryProvider.isApplicableTo(Class)
returnstrue
for the respective record class.- Specified by:
createFactoryFor
in interfaceIRecordFactoryProvider
- Parameters:
recordClass
- The record class to create a factory for- Returns:
- The created factory instance
-