public class AnalysisCache extends java.lang.Object implements IAnalysisCache
| Modifier and Type | Method and Description | 
|---|---|
void | 
dispose()
Cleans up all cached data 
 | 
<E> void | 
eagerlyPutDatabase(java.lang.Class<E> databaseClass,
                  E database)
Eagerly install a database. 
 | 
<E> void | 
eagerlyPutMethodAnalysis(java.lang.Class<E> analysisClass,
                        MethodDescriptor methodDescriptor,
                        E analysisObject)
Eagerly put a method analysis object in the cache. 
 | 
java.util.Map<?,?> | 
getAnalysisLocals()
Get map of analysis-local objects. 
 | 
java.util.Map<ClassDescriptor,java.lang.Object> | 
getClassAnalysis(java.lang.Class<?> analysisClass)  | 
<E> E | 
getClassAnalysis(java.lang.Class<E> analysisClass,
                ClassDescriptor classDescriptor)
Get an analysis of the given class. 
 | 
IClassPath | 
getClassPath()
Get the classpath from which classes are loaded. 
 | 
<E> E | 
getDatabase(java.lang.Class<E> databaseClass)
Get a database. 
 | 
<E> E | 
getDatabase(java.lang.Class<E> databaseClass,
           boolean optional)  | 
IErrorLogger | 
getErrorLogger()
Get the error logger. 
 | 
<E> E | 
getMethodAnalysis(java.lang.Class<E> analysisClass,
                 MethodDescriptor methodDescriptor)
Get an analysis of the given method. 
 | 
<E> E | 
getOptionalDatabase(java.lang.Class<E> databaseClass)  | 
Profiler | 
getProfiler()
Get the analysis profiler instance, never null 
 | 
<E> E | 
probeClassAnalysis(java.lang.Class<E> analysisClass,
                  ClassDescriptor classDescriptor)
See if the cache contains a cached class analysis result for given class
 descriptor. 
 | 
void | 
purgeAllMethodAnalysis()
Purge all method analysis results for all methods. 
 | 
void | 
purgeClassAnalysis(java.lang.Class<?> analysisClass)
Purge all class analysis results of a particular kind 
 | 
void | 
purgeMethodAnalyses(MethodDescriptor methodDescriptor)
Purge all analysis results for given method. 
 | 
<E> void | 
registerClassAnalysisEngine(java.lang.Class<E> analysisResultType,
                           IClassAnalysisEngine<E> classAnalysisEngine)
Register the given class analysis engine as producing the analysis result
 type whose Class is given. 
 | 
<E> void | 
registerDatabaseFactory(java.lang.Class<E> databaseClass,
                       IDatabaseFactory<E> databaseFactory)
Register a database factory. 
 | 
<E> void | 
registerMethodAnalysisEngine(java.lang.Class<E> analysisResultType,
                            IMethodAnalysisEngine<E> methodAnalysisEngine)
Register the given method analysis engine as producing the analysis
 result type whose Class is given. 
 | 
<E> void | 
reuseClassAnalysis(java.lang.Class<E> analysisClass,
                  java.util.Map<ClassDescriptor,java.lang.Object> map)
Adds the data for given analysis type from given map to the cache 
 | 
public final java.util.Map<?,?> getAnalysisLocals()
IAnalysisCachegetAnalysisLocals in interface IAnalysisCachepublic IClassPath getClassPath()
IAnalysisCachegetClassPath in interface IAnalysisCachepublic void purgeAllMethodAnalysis()
IAnalysisCachepurgeAllMethodAnalysis in interface IAnalysisCachepublic void purgeClassAnalysis(java.lang.Class<?> analysisClass)
IAnalysisCachepurgeClassAnalysis in interface IAnalysisCachepublic void dispose()
@CheckForNull public java.util.Map<ClassDescriptor,java.lang.Object> getClassAnalysis(java.lang.Class<?> analysisClass)
analysisClass - non null analysis typepublic <E> void reuseClassAnalysis(java.lang.Class<E> analysisClass,
                          java.util.Map<ClassDescriptor,java.lang.Object> map)
analysisClass - non null analysis typemap - non null, pre-filled map with analysis data for given typepublic <E> E getClassAnalysis(java.lang.Class<E> analysisClass,
                     @Nonnull
                     ClassDescriptor classDescriptor)
                   throws CheckedAnalysisException
IAnalysisCachegetClassAnalysis in interface IAnalysisCacheE - the type of the analysis (e.g., FoobarAnalysis)analysisClass - the analysis class object (e.g., FoobarAnalysis.class)classDescriptor - the descriptor of the class to analyzeCheckedAnalysisException - if an error occurs performing the analysispublic <E> E probeClassAnalysis(java.lang.Class<E> analysisClass,
                       @Nonnull
                       ClassDescriptor classDescriptor)
IAnalysisCacheprobeClassAnalysis in interface IAnalysisCacheanalysisClass - analysis result classclassDescriptor - the class descriptorpublic <E> E getMethodAnalysis(java.lang.Class<E> analysisClass,
                      @Nonnull
                      MethodDescriptor methodDescriptor)
                    throws CheckedAnalysisException
IAnalysisCachegetMethodAnalysis in interface IAnalysisCacheE - the type of the analysis (e.g., FoobarAnalysis)analysisClass - the analysis class object (e.g., FoobarAnalysis.class)methodDescriptor - the descriptor of the method to analyzeCheckedAnalysisException - if an error occurs performing the analysispublic <E> void eagerlyPutMethodAnalysis(java.lang.Class<E> analysisClass,
                                @Nonnull
                                MethodDescriptor methodDescriptor,
                                E analysisObject)
IAnalysisCacheeagerlyPutMethodAnalysis in interface IAnalysisCacheE - the type of the analysis (e.g., FoobarAnalysis)analysisClass - the analysis class object (e.g., FoobarAnalysis.class)methodDescriptor - the descriptor of the method to analyzepublic void purgeMethodAnalyses(@Nonnull
                       MethodDescriptor methodDescriptor)
IAnalysisCachepurgeMethodAnalyses in interface IAnalysisCachemethodDescriptor - method whose analysis results should be purgedpublic <E> void registerClassAnalysisEngine(java.lang.Class<E> analysisResultType,
                                   IClassAnalysisEngine<E> classAnalysisEngine)
IAnalysisCacheregisterClassAnalysisEngine in interface IAnalysisCacheE - analysis result typeanalysisResultType - analysis result type Class objectclassAnalysisEngine - the class analysis engine to registerpublic <E> void registerMethodAnalysisEngine(java.lang.Class<E> analysisResultType,
                                    IMethodAnalysisEngine<E> methodAnalysisEngine)
IAnalysisCacheregisterMethodAnalysisEngine in interface IAnalysisCacheE - analysis result typeanalysisResultType - analysis result type Class objectmethodAnalysisEngine - the method analysis engine to registerpublic <E> void registerDatabaseFactory(java.lang.Class<E> databaseClass,
                               IDatabaseFactory<E> databaseFactory)
IAnalysisCacheregisterDatabaseFactory in interface IAnalysisCacheE - type of databasedatabaseClass - Class of databasedatabaseFactory - the database factorypublic <E> E getDatabase(java.lang.Class<E> databaseClass)
IAnalysisCachegetDatabase in interface IAnalysisCacheE - type of databasedatabaseClass - Class of database@CheckForNull public <E> E getOptionalDatabase(java.lang.Class<E> databaseClass)
getOptionalDatabase in interface IAnalysisCachepublic <E> E getDatabase(java.lang.Class<E> databaseClass,
                boolean optional)
public <E> void eagerlyPutDatabase(java.lang.Class<E> databaseClass,
                          E database)
IAnalysisCacheeagerlyPutDatabase in interface IAnalysisCacheE - type of databasedatabaseClass - Class of databasedatabase - database objectpublic IErrorLogger getErrorLogger()
IAnalysisCachegetErrorLogger in interface IAnalysisCachepublic Profiler getProfiler()
IAnalysisCachegetProfiler in interface IAnalysisCacheFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.