Java Doc for AnalysisContext.java in  » Code-Analyzer » findbugs » edu » umd » cs » findbugs » ba » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Code Analyzer » findbugs » edu.umd.cs.findbugs.ba 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.umd.cs.findbugs.ba.AnalysisContext

All known Subclasses:   edu.umd.cs.findbugs.ba.LegacyAnalysisContext,  edu.umd.cs.findbugs.ba.AnalysisCacheToAnalysisContextAdapter,
AnalysisContext
abstract public class AnalysisContext (Code)
A context for analysis of a complete project. This serves as the repository for whole-program information and data structures.

NOTE: this class is slated to become obsolete. New code should use the IAnalysisCache object returned by Global.getAnalysisCache() to access all analysis information (global databases, class and method analyses, etc.)


author:
   David Hovemeyer
See Also:   IAnalysisCache
See Also:   edu.umd.cs.findbugs.classfile.Global


Field Summary
final public static  booleanDEBUG
    
final public static  StringDEFAULT_CHECK_FOR_NULL_PARAM_DATABASE_FILENAME
    
final public static  StringDEFAULT_NONNULL_PARAM_DATABASE_FILENAME
    
final public static  StringDEFAULT_NULL_RETURN_VALUE_ANNOTATION_DATABASE
    
final public static  StringDEFAULT_NULL_RETURN_VALUE_DB_FILENAME
    
final public static  booleanIGNORE_BUILTIN_MODELS
    
final public static  StringNONNULL_RETURN_DB_FILENAME
    
final public static  StringNONNULL_RETURN_DB_RESOURCE
    
final public static  StringUNCONDITIONAL_DEREF_DB_FILENAME
    
final public static  StringUNCONDITIONAL_DEREF_DB_RESOURCE
    
 DirectlyRelevantTypeQualifiersDatabasedirectlyRelevantTypeQualifiersDatabase
    
 booleanmissingClassWarningsSuppressed
    
 UnreadFieldsunreadFields
    

Constructor Summary
protected  AnalysisContext()
    

Method Summary
abstract public  voidaddApplicationClassToRepository(JavaClass appClass)
     Add an application class to the repository.
abstract public  voidaddClasspathEntry(String url)
     Add an entry to the Repository's classpath.
abstract public  voidclearClassContextCache()
     Clear the ClassContext cache.
abstract public  voidclearRepository()
     Clear the BCEL Repository in preparation for analysis.
public static  AnalysisContextcreate(RepositoryLookupFailureCallback lookupFailureCallback)
     Create a new AnalysisContext.
public static  AnalysisContextcurrentAnalysisContext()
    
public static  XFactorycurrentXFactory()
    
abstract public  AnnotationRetentionDatabasegetAnnotationRetentionDatabase()
    
final public  booleangetBoolProperty(int prop)
     Get a boolean property.
abstract public  CheckReturnAnnotationDatabasegetCheckReturnAnnotationDatabase()
    
abstract public  ClassContextgetClassContext(JavaClass javaClass)
     Get the ClassContext for a class.
abstract public  StringgetClassContextStats()
     Get stats about hit rate for ClassContext cache.
final public  StringgetDatabaseInputDir()
     Get the interprocedural database input directory.
final public  StringgetDatabaseOutputDir()
     Get the interprocedural database output directory.
public  DirectlyRelevantTypeQualifiersDatabasegetDirectlyRelevantTypeQualifiersDatabase()
    
abstract public  FieldStoreTypeDatabasegetFieldStoreTypeDatabase()
     Get the property database recording the types of values stored into fields.
abstract public  InnerClassAccessMapgetInnerClassAccessMap()
    
abstract public  JCIPAnnotationDatabasegetJCIPAnnotationDatabase()
    
abstract public  RepositoryLookupFailureCallbackgetLookupFailureCallback()
     Get the lookup failure callback.
abstract public  INullnessAnnotationDatabasegetNullnessAnnotationDatabase()
    
abstract public  ReturnValueNullnessPropertyDatabasegetReturnValueNullnessPropertyDatabase()
    
abstract public  SourceFindergetSourceFinder()
     Get the SourceFinder, for finding source files.
abstract public  SourceInfoMapgetSourceInfoMap()
     Get the SourceInfoMap.
abstract public  SubtypesgetSubtypes()
     Get the Subtypes database.
abstract public  Subtypes2getSubtypes2()
     Get the Subtypes2 inheritance hierarchy database.
abstract public  ParameterNullnessPropertyDatabasegetUnconditionalDerefParamDatabase()
     Get the property database recording which methods unconditionally dereference parameters.
public  UnreadFieldsgetUnreadFields()
    
public  Collection<XClass>getXClassCollection()
     Get Collection of all XClass objects seen so far.
abstract public  voidinitDatabases()
     Instantiate the CheckReturnAnnotationDatabase.
public  booleanisApplicationClass(JavaClass cls)
     Return whether or not the given class is an application class.
public  booleanisApplicationClass(String className)
     Return whether or not the given class is an application class.
public  booleanisApplicationClass(ClassDescriptor desc)
    
final public  voidloadDefaultInterproceduralDatabases()
     If possible, load default (built-in) interprocedural property databases.
final public  voidloadInterproceduralDatabases()
     If possible, load interprocedural property databases.
public  DatabaseTypeloadPropertyDatabase(DatabaseType database, String fileName, String description)
     Load an interprocedural property database.
public  DatabaseTypeloadPropertyDatabaseFromResource(DatabaseType database, String resourceName, String description)
     Load an interprocedural property database.
public static  voidlogError(String msg, Exception e)
    
public static  voidlogError(String msg)
    
abstract public  JavaClasslookupClass(String className)
     Lookup a class.
public  JavaClasslookupClass(ClassDescriptor classDescriptor)
     Lookup a class.
final public  StringlookupSourceFile(String dottedClassName)
    
public static  JavaClasslookupSystemClass(String className)
     This is equivalent to Repository.lookupClass() or this.lookupClass(), except it uses the original Repository instead of the current one.
public static  voidremoveCurrentAnalysisContext()
    
public static  voidreportMissingClass(ClassNotFoundException e)
    
final public  voidsetBoolProperty(int prop, boolean value)
     Set a boolean property.
public static  voidsetCurrentAnalysisContext(AnalysisContext analysisContext)
     Set the current analysis context for this thread.
final public  voidsetDatabaseInputDir(String databaseInputDir)
     Set the interprocedural database input directory.
final public  voidsetDatabaseOutputDir(String databaseOutputDir)
     Set the interprocedural database output directory.
public  voidsetDirectlyRelevantTypeQualifiersDatabase(DirectlyRelevantTypeQualifiersDatabase directlyRelevantTypeQualifiersDatabase)
    
public  booleansetMissingClassWarningsSuppressed(boolean value)
    
final public  voidsetSourcePath(List<String> sourcePath)
     Set the source path.
public  voidsetUnreadFields(UnreadFields unreadFields)
    
public  voidstorePropertyDatabase(DatabaseType database, String fileName, String description)
     Write an interprocedural property database.
abstract public  voidupdateDatabases(int pass)
     After a pass has been completed, allow the analysis context to update information.

Field Detail
DEBUG
final public static boolean DEBUG(Code)



DEFAULT_CHECK_FOR_NULL_PARAM_DATABASE_FILENAME
final public static String DEFAULT_CHECK_FOR_NULL_PARAM_DATABASE_FILENAME(Code)



DEFAULT_NONNULL_PARAM_DATABASE_FILENAME
final public static String DEFAULT_NONNULL_PARAM_DATABASE_FILENAME(Code)



DEFAULT_NULL_RETURN_VALUE_ANNOTATION_DATABASE
final public static String DEFAULT_NULL_RETURN_VALUE_ANNOTATION_DATABASE(Code)



DEFAULT_NULL_RETURN_VALUE_DB_FILENAME
final public static String DEFAULT_NULL_RETURN_VALUE_DB_FILENAME(Code)



IGNORE_BUILTIN_MODELS
final public static boolean IGNORE_BUILTIN_MODELS(Code)



NONNULL_RETURN_DB_FILENAME
final public static String NONNULL_RETURN_DB_FILENAME(Code)



NONNULL_RETURN_DB_RESOURCE
final public static String NONNULL_RETURN_DB_RESOURCE(Code)



UNCONDITIONAL_DEREF_DB_FILENAME
final public static String UNCONDITIONAL_DEREF_DB_FILENAME(Code)



UNCONDITIONAL_DEREF_DB_RESOURCE
final public static String UNCONDITIONAL_DEREF_DB_RESOURCE(Code)



directlyRelevantTypeQualifiersDatabase
DirectlyRelevantTypeQualifiersDatabase directlyRelevantTypeQualifiersDatabase(Code)



missingClassWarningsSuppressed
boolean missingClassWarningsSuppressed(Code)



unreadFields
UnreadFields unreadFields(Code)




Constructor Detail
AnalysisContext
protected AnalysisContext()(Code)




Method Detail
addApplicationClassToRepository
abstract public void addApplicationClassToRepository(JavaClass appClass)(Code)
Add an application class to the repository.
Parameters:
  appClass - the application class



addClasspathEntry
abstract public void addClasspathEntry(String url) throws IOException(Code)
Add an entry to the Repository's classpath.
Parameters:
  url - the classpath entry URL
throws:
  IOException -



clearClassContextCache
abstract public void clearClassContextCache()(Code)
Clear the ClassContext cache. This should be done between analysis passes.



clearRepository
abstract public void clearRepository()(Code)
Clear the BCEL Repository in preparation for analysis.



create
public static AnalysisContext create(RepositoryLookupFailureCallback lookupFailureCallback)(Code)
Create a new AnalysisContext.
Parameters:
  lookupFailureCallback - the RepositoryLookupFailureCallback thatthe AnalysisContext should use to report errors a new AnalysisContext



currentAnalysisContext
public static AnalysisContext currentAnalysisContext()(Code)
Get the AnalysisContext associated with this thread



currentXFactory
public static XFactory currentXFactory()(Code)



getAnnotationRetentionDatabase
abstract public AnnotationRetentionDatabase getAnnotationRetentionDatabase()(Code)



getBoolProperty
final public boolean getBoolProperty(int prop)(Code)
Get a boolean property.
Parameters:
  prop - the property value of the property; defaults to false if the propertyhas not had a value assigned explicitly



getCheckReturnAnnotationDatabase
abstract public CheckReturnAnnotationDatabase getCheckReturnAnnotationDatabase()(Code)



getClassContext
abstract public ClassContext getClassContext(JavaClass javaClass)(Code)
Get the ClassContext for a class.
Parameters:
  javaClass - the class the ClassContext for that class



getClassContextStats
abstract public String getClassContextStats()(Code)
Get stats about hit rate for ClassContext cache. stats about hit rate for ClassContext cache



getDatabaseInputDir
final public String getDatabaseInputDir()(Code)
Get the interprocedural database input directory. the interprocedural database input directory



getDatabaseOutputDir
final public String getDatabaseOutputDir()(Code)
Get the interprocedural database output directory. the interprocedural database output directory



getDirectlyRelevantTypeQualifiersDatabase
public DirectlyRelevantTypeQualifiersDatabase getDirectlyRelevantTypeQualifiersDatabase()(Code)



getFieldStoreTypeDatabase
abstract public FieldStoreTypeDatabase getFieldStoreTypeDatabase()(Code)
Get the property database recording the types of values stored into fields. the database, or null if there is no database available



getInnerClassAccessMap
abstract public InnerClassAccessMap getInnerClassAccessMap()(Code)



getJCIPAnnotationDatabase
abstract public JCIPAnnotationDatabase getJCIPAnnotationDatabase()(Code)



getLookupFailureCallback
abstract public RepositoryLookupFailureCallback getLookupFailureCallback()(Code)
Get the lookup failure callback.



getNullnessAnnotationDatabase
abstract public INullnessAnnotationDatabase getNullnessAnnotationDatabase()(Code)



getReturnValueNullnessPropertyDatabase
abstract public ReturnValueNullnessPropertyDatabase getReturnValueNullnessPropertyDatabase()(Code)
Get the property database recording which methods always return nonnull values the database, or null if there is no database available



getSourceFinder
abstract public SourceFinder getSourceFinder()(Code)
Get the SourceFinder, for finding source files.



getSourceInfoMap
abstract public SourceInfoMap getSourceInfoMap()(Code)
Get the SourceInfoMap.



getSubtypes
abstract public Subtypes getSubtypes()(Code)
Get the Subtypes database. the Subtypes database



getSubtypes2
abstract public Subtypes2 getSubtypes2()(Code)
Get the Subtypes2 inheritance hierarchy database.



getUnconditionalDerefParamDatabase
abstract public ParameterNullnessPropertyDatabase getUnconditionalDerefParamDatabase()(Code)
Get the property database recording which methods unconditionally dereference parameters. the database, or null if there is no database available



getUnreadFields
public UnreadFields getUnreadFields()(Code)



getXClassCollection
public Collection<XClass> getXClassCollection()(Code)
Get Collection of all XClass objects seen so far. Collection of all XClass objects seen so far



initDatabases
abstract public void initDatabases()(Code)
Instantiate the CheckReturnAnnotationDatabase. Do this after the repository has been set up.



isApplicationClass
public boolean isApplicationClass(JavaClass cls)(Code)
Return whether or not the given class is an application class.
Parameters:
  cls - the class to lookup true if the class is an application class, false if notan application class or if the class cannot be located



isApplicationClass
public boolean isApplicationClass(String className)(Code)
Return whether or not the given class is an application class.
Parameters:
  className - name of a class true if the class is an application class, false if notan application class or if the class cannot be located



isApplicationClass
public boolean isApplicationClass(ClassDescriptor desc)(Code)



loadDefaultInterproceduralDatabases
final public void loadDefaultInterproceduralDatabases()(Code)
If possible, load default (built-in) interprocedural property databases. These are the databases for things like Java core APIs that unconditional dereference parameters.



loadInterproceduralDatabases
final public void loadInterproceduralDatabases()(Code)
If possible, load interprocedural property databases.



loadPropertyDatabase
public DatabaseType loadPropertyDatabase(DatabaseType database, String fileName, String description)(Code)
Load an interprocedural property database. <
Parameters:
  DatabaseType - > actual type of the database<
Parameters:
  KeyType - > type of key (e.g., method or field)<
Parameters:
  Property - > type of properties stored in the database
Parameters:
  database - the empty database object
Parameters:
  fileName - file to load database from
Parameters:
  description - description of the database (for diagnostics) the database object, or null if the database couldn't be loaded



loadPropertyDatabaseFromResource
public DatabaseType loadPropertyDatabaseFromResource(DatabaseType database, String resourceName, String description)(Code)
Load an interprocedural property database. <
Parameters:
  DatabaseType - > actual type of the database<
Parameters:
  KeyType - > type of key (e.g., method or field)<
Parameters:
  Property - > type of properties stored in the database
Parameters:
  database - the empty database object
Parameters:
  resourceName - name of resource to load the database from
Parameters:
  description - description of the database (for diagnostics) the database object, or null if the database couldn't be loaded



logError
public static void logError(String msg, Exception e)(Code)
Report an error



logError
public static void logError(String msg)(Code)
Report an error



lookupClass
abstract public JavaClass lookupClass(String className) throws ClassNotFoundException(Code)
Lookup a class. Use this method instead of Repository.lookupClass().
Parameters:
  className - the name of the class the JavaClass representing the class
throws:
  ClassNotFoundException - (but not really)



lookupClass
public JavaClass lookupClass(ClassDescriptor classDescriptor) throws ClassNotFoundException(Code)
Lookup a class. Use this method instead of Repository.lookupClass().
Parameters:
  classDescriptor - descriptor specifying the class to look up the class
throws:
  ClassNotFoundException - if the class can't be found



lookupSourceFile
final public String lookupSourceFile(String dottedClassName)(Code)
Lookup a class's source file
Parameters:
  className - the name of the class the source file for the class, or SourceLineAnnotation.UNKNOWN_SOURCE_FILE if unable to determine



lookupSystemClass
public static JavaClass lookupSystemClass(String className) throws ClassNotFoundException(Code)
This is equivalent to Repository.lookupClass() or this.lookupClass(), except it uses the original Repository instead of the current one. This can be important because URLClassPathRepository objects are closed after an analysis, so JavaClass objects obtained from them are no good on subsequent runs.
Parameters:
  className - the name of the class the JavaClass representing the class
throws:
  ClassNotFoundException -



removeCurrentAnalysisContext
public static void removeCurrentAnalysisContext()(Code)



reportMissingClass
public static void reportMissingClass(ClassNotFoundException e)(Code)
file a ClassNotFoundException with the lookupFailureCallback
See Also:   AnalysisContext.getLookupFailureCallback()



setBoolProperty
final public void setBoolProperty(int prop, boolean value)(Code)
Set a boolean property.
Parameters:
  prop - the property to set
Parameters:
  value - the value of the property



setCurrentAnalysisContext
public static void setCurrentAnalysisContext(AnalysisContext analysisContext)(Code)
Set the current analysis context for this thread.
Parameters:
  analysisContext - the current analysis context for this thread



setDatabaseInputDir
final public void setDatabaseInputDir(String databaseInputDir)(Code)
Set the interprocedural database input directory.
Parameters:
  databaseInputDir - the interprocedural database input directory



setDatabaseOutputDir
final public void setDatabaseOutputDir(String databaseOutputDir)(Code)
Set the interprocedural database output directory.
Parameters:
  databaseOutputDir - the interprocedural database output directory



setDirectlyRelevantTypeQualifiersDatabase
public void setDirectlyRelevantTypeQualifiersDatabase(DirectlyRelevantTypeQualifiersDatabase directlyRelevantTypeQualifiersDatabase)(Code)



setMissingClassWarningsSuppressed
public boolean setMissingClassWarningsSuppressed(boolean value)(Code)



setSourcePath
final public void setSourcePath(List<String> sourcePath)(Code)
Set the source path.



setUnreadFields
public void setUnreadFields(UnreadFields unreadFields)(Code)



storePropertyDatabase
public void storePropertyDatabase(DatabaseType database, String fileName, String description)(Code)
Write an interprocedural property database. <
Parameters:
  DatabaseType - > actual type of the database<
Parameters:
  KeyType - > type of key (e.g., method or field)<
Parameters:
  Property - > type of properties stored in the database
Parameters:
  database - the database
Parameters:
  fileName - name of database file
Parameters:
  description - description of the database



updateDatabases
abstract public void updateDatabases(int pass)(Code)
After a pass has been completed, allow the analysis context to update information.
Parameters:
  pass - -- the first pass is pass 0



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.