Package edu.umd.cs.findbugs.classfile
Class ReflectionDatabaseFactory<E>
java.lang.Object
edu.umd.cs.findbugs.classfile.ReflectionDatabaseFactory<E>
- All Implemented Interfaces:
IDatabaseFactory<E>
A generic database factory that tries to create the database by (in order of
preference)
- Invoking a static create method
- Invoking a no-arg constructor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate E
Try to create the database using a no-arg constructor.private E
Try to create the database using a static create() method.void
registerWith
(IAnalysisCache analysisCache)
-
Field Details
-
databaseClass
-
-
Constructor Details
-
ReflectionDatabaseFactory
-
-
Method Details
-
createDatabase
- Specified by:
createDatabase
in interfaceIDatabaseFactory<E>
- Throws:
CheckedAnalysisException
-
createUsingStaticCreateMethod
Try to create the database using a static create() method.- Returns:
- the database, or null if there is no static create() method
- Throws:
CheckedAnalysisException
-
createUsingConstructor
Try to create the database using a no-arg constructor.- Returns:
- the database, or null if there is no no-arg constructor
- Throws:
CheckedAnalysisException
-
registerWith
- Specified by:
registerWith
in interfaceIDatabaseFactory<E>
-