Java Doc for ClassContext.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.ClassContext

ClassContext
public class ClassContext (Code)
A ClassContext caches all of the auxiliary objects used to analyze the methods of a class. That way, these objects don't need to be created over and over again.
author:
   David Hovemeyer


Field Summary
final public static  booleanDEBUG
    
final public static  booleanDUMP_DATAFLOW_ANALYSIS
    
final public static  booleanTIME_ANALYSES
    
static  MapCache<XMethod, BitSet>cachedBitsets
    
static  MapCache<XMethod, Set<Integer>>cachedLoopExits
    
public static  intdepth
    
 List<Method>methodsInCallOrder
    

Constructor Summary
public  ClassContext(JavaClass jclass, AnalysisContext analysisContext)
     Constructor.

Method Summary
static  booleancheckForBranchExit(byte[] codeBytes, int pos)
    
public  voiddumpDataflowInformation(Method method)
    
public static  voiddumpDataflowInformation(Method method, CFG cfg, ValueNumberDataflow vnd, IsNullValueDataflow inv, UnconditionalValueDerefDataflow dataflow, TypeDataflow typeDataflow)
    
public  voiddumpSimpleDataflowInformation(Method method)
    
public static  voiddumpTypeDataflow(Method method, CFG cfg, TypeDataflow typeDataflow)
    
public  AnalysisContextgetAnalysisContext()
     Get the AnalysisContext.
public  AssertionMethodsgetAssertionMethods()
     Get AssertionMethods for class.
public  BlockTypeDataflowgetBlockTypeDataflow(Method method)
     Get BlockType dataflow for given method.
static  shortgetBranchOffset(byte[] codeBytes, int pos)
    
public  BitSetgetBytecodeSet(Method method)
     Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it is very fast and memory-efficient.
public static  BitSetgetBytecodeSet(JavaClass clazz, Method method)
     Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it is very fast and memory-efficient.
public  CFGgetCFG(Method method)
     Get a CFG for given method.
public  CallListDataflowgetCallListDataflow(Method method)
     Get CallListDataflow for method.
public  ClassDescriptorgetClassDescriptor()
    
public  CompactLocationNumberinggetCompactLocationNumbering(Method method)
     Get a CompactLocationNumbering for a method.
public  ConstantDataflowgetConstantDataflow(Method method)
     Get ConstantDataflow for method.
public  ConstantPoolGengetConstantPoolGen()
     Get the ConstantPoolGen used to create the MethodGens for this class.
public  DefinitelyNullSetDataflowgetDefinitelyNullSetDataflow(Method method)
     Get DefinitelyNullSetDataflow for a method.
public  DepthFirstSearchgetDepthFirstSearch(Method method)
     Get a DepthFirstSearch for given method.
public  ExceptionSetFactorygetExceptionSetFactory(Method method)
     Get ExceptionSetFactory for given method.
public  IsNullValueDataflowgetIsNullValueDataflow(Method method)
     Get an IsNullValueDataflow for given method.
public  JavaClassgetJavaClass()
     Get the JavaClass.
public  LiveLocalStoreDataflowgetLiveLocalStoreDataflow(Method method)
     Get LiveLocalStoreAnalysis dataflow for given method.
public  LoadDataflowgetLoadDataflow(Method method)
     Get load dataflow.
public  LoadedFieldSetgetLoadedFieldSet(Method method)
     Get the set of fields loaded by given method.
public  LockCheckergetLockChecker(Method method)
     Get LockChecker for method.
public  LockDataflowgetLockDataflow(Method method)
     Get dataflow for LockAnalysis for given method.
public  RepositoryLookupFailureCallbackgetLookupFailureCallback()
     Get the RepositoryLookupFailureCallback.
public static  Set<Integer>getLoopExitBranches(Method method, MethodGen methodGen)
    
public  MethodgetMethod(MethodGen methodGen)
     Look up the Method represented by given MethodGen.
public  ObjectgetMethodAnalysis(Class analysisClass, MethodDescriptor methodDescriptor)
     Retrieve a method analysis object.
public  MethodGengetMethodGen(Method method)
     Get a MethodGen object for given method.
public  List<Method>getMethodsInCallOrder()
    
public  DominatorsAnalysisgetNonExceptionDominatorsAnalysis(Method method)
     Get DominatorsAnalysis for given method, where exception edges are ignored.
public  PostDominatorsAnalysisgetNonExceptionPostDominatorsAnalysis(Method method)
     Get PostDominatorsAnalysis for given method, where exception edges are ignored.
public  PostDominatorsAnalysisgetNonImplicitExceptionDominatorsAnalysis(Method method)
     Get DominatorsAnalysis for given method, where implicit exception edges are ignored.
public  Map<MethodDescriptor, Object>getObjectMap(Class analysisClass)
    
public  short[]getOffsetToOpcodeMap(Method method)
     Get array mapping bytecode offsets to opcodes for given method. Array elements containing zero are either not valid instruction offsets, or contain a NOP instruction.
public  String[]getParameterSignatureList(Method method)
     Get array of type signatures of parameters for given method.
public  ReturnPathDataflowgetReturnPathDataflow(Method method)
     Get ReturnPathDataflow for method.
public  ReturnPathTypeDataflowgetReturnPathTypeDataflow(Method method)
     Get ReturnPathTypeDataflow for a method.
public  ReverseDepthFirstSearchgetReverseDepthFirstSearch(Method method)
     Get a ReverseDepthFirstSearch for given method.
public  StoreDataflowgetStoreDataflow(Method method)
     Get store dataflow.
public  TypeDataflowgetTypeDataflow(Method method)
     Get a TypeDataflow for given method.
public  UnconditionalValueDerefDataflowgetUnconditionalValueDerefDataflow(Method method)
     Get the UnconditionalValueDerefDataflow for a method.
public  UsagesRequiringNonNullValuesgetUsagesRequiringNonNullValues(Method method)
     Get a UsagesRequiringNonNullValues for given method.
public  ValueNumberDataflowgetValueNumberDataflow(Method method)
     Get a ValueNumberDataflow for given method.
public  XClassgetXClass()
    
public static  voidindent()
    
public static  BitSetlinesMentionedMultipleTimes(Method method)
    
public  voidpurgeAllMethodAnalyses()
    
public  voidpurgeMethodAnalyses(MethodDescriptor methodDescriptor)
     Purge all CFG-based method analyses for given method.
public  voidputMethodAnalysis(Class analysisClass, MethodDescriptor methodDescriptor, Object object)
     Store a method analysis object.

Field Detail
DEBUG
final public static boolean DEBUG(Code)



DUMP_DATAFLOW_ANALYSIS
final public static boolean DUMP_DATAFLOW_ANALYSIS(Code)



TIME_ANALYSES
final public static boolean TIME_ANALYSES(Code)



cachedBitsets
static MapCache<XMethod, BitSet> cachedBitsets(Code)



cachedLoopExits
static MapCache<XMethod, Set<Integer>> cachedLoopExits(Code)



depth
public static int depth(Code)



methodsInCallOrder
List<Method> methodsInCallOrder(Code)




Constructor Detail
ClassContext
public ClassContext(JavaClass jclass, AnalysisContext analysisContext)(Code)
Constructor.
Parameters:
  jclass - the JavaClass




Method Detail
checkForBranchExit
static boolean checkForBranchExit(byte[] codeBytes, int pos)(Code)



dumpDataflowInformation
public void dumpDataflowInformation(Method method)(Code)



dumpDataflowInformation
public static void dumpDataflowInformation(Method method, CFG cfg, ValueNumberDataflow vnd, IsNullValueDataflow inv, UnconditionalValueDerefDataflow dataflow, TypeDataflow typeDataflow) throws DataflowAnalysisException(Code)

Parameters:
  method -
Parameters:
  cfg -
Parameters:
  vnd -
Parameters:
  inv -
Parameters:
  dataflow -
Parameters:
  typeDataflow - TODO
throws:
  DataflowAnalysisException -



dumpSimpleDataflowInformation
public void dumpSimpleDataflowInformation(Method method)(Code)



dumpTypeDataflow
public static void dumpTypeDataflow(Method method, CFG cfg, TypeDataflow typeDataflow) throws DataflowAnalysisException(Code)

Parameters:
  method -
Parameters:
  cfg -
Parameters:
  typeDataflow -
throws:
  DataflowAnalysisException -



getAnalysisContext
public AnalysisContext getAnalysisContext()(Code)
Get the AnalysisContext.



getAssertionMethods
public AssertionMethods getAssertionMethods()(Code)
Get AssertionMethods for class. the AssertionMethods



getBlockTypeDataflow
public BlockTypeDataflow getBlockTypeDataflow(Method method) throws DataflowAnalysisException, CFGBuilderException(Code)
Get BlockType dataflow for given method.
Parameters:
  method - the method the Dataflow object for BlockTypeAnalysis on the method



getBranchOffset
static short getBranchOffset(byte[] codeBytes, int pos)(Code)



getBytecodeSet
public BitSet getBytecodeSet(Method method)(Code)
Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it is very fast and memory-efficient. It may allow a Detector to avoid some very expensive analysis, which is a Big Win for the user.
Parameters:
  method - the method the BitSet containing the opcodes which appear in the method,or null if the method has no code



getBytecodeSet
public static BitSet getBytecodeSet(JavaClass clazz, Method method)(Code)
Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it is very fast and memory-efficient. It may allow a Detector to avoid some very expensive analysis, which is a Big Win for the user.
Parameters:
  method - the method the BitSet containing the opcodes which appear in the method,or null if the method has no code



getCFG
public CFG getCFG(Method method) throws CFGBuilderException(Code)
Get a CFG for given method. If pruning options are in effect, pruning will be done. Because the CFG pruning can involve interprocedural analysis, it is done on a best-effort basis, so the CFG returned might not actually be pruned.
Parameters:
  method - the method the CFG
throws:
  CFGBuilderException - if a CFG cannot be constructed for the method



getCallListDataflow
public CallListDataflow getCallListDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get CallListDataflow for method.
Parameters:
  method - the method the CallListDataflow
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getClassDescriptor
public ClassDescriptor getClassDescriptor()(Code)



getCompactLocationNumbering
public CompactLocationNumbering getCompactLocationNumbering(Method method) throws CFGBuilderException(Code)
Get a CompactLocationNumbering for a method.
Parameters:
  method - a method the CompactLocationNumbering for the method
throws:
  CFGBuilderException -



getConstantDataflow
public ConstantDataflow getConstantDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get ConstantDataflow for method.
Parameters:
  method - the method the ConstantDataflow
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getConstantPoolGen
public ConstantPoolGen getConstantPoolGen()(Code)
Get the ConstantPoolGen used to create the MethodGens for this class. the ConstantPoolGen



getDefinitelyNullSetDataflow
public DefinitelyNullSetDataflow getDefinitelyNullSetDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get DefinitelyNullSetDataflow for a method.
Parameters:
  method - a method the DefinitelyNullSetDataflow for the method
throws:
  DataflowAnalysisException -
throws:
  CFGBuilderException -



getDepthFirstSearch
public DepthFirstSearch getDepthFirstSearch(Method method) throws CFGBuilderException(Code)
Get a DepthFirstSearch for given method.
Parameters:
  method - the method the DepthFirstSearch



getExceptionSetFactory
public ExceptionSetFactory getExceptionSetFactory(Method method)(Code)
Get ExceptionSetFactory for given method.
Parameters:
  method - the method the ExceptionSetFactory



getIsNullValueDataflow
public IsNullValueDataflow getIsNullValueDataflow(Method method) throws DataflowAnalysisException, CFGBuilderException(Code)
Get an IsNullValueDataflow for given method.
Parameters:
  method - the method the IsNullValueDataflow



getJavaClass
public JavaClass getJavaClass()(Code)
Get the JavaClass.



getLiveLocalStoreDataflow
public LiveLocalStoreDataflow getLiveLocalStoreDataflow(Method method) throws DataflowAnalysisException, CFGBuilderException(Code)
Get LiveLocalStoreAnalysis dataflow for given method.
Parameters:
  method - the method the Dataflow object for LiveLocalStoreAnalysis on the method



getLoadDataflow
public LoadDataflow getLoadDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get load dataflow.
Parameters:
  method - the method the LoadDataflow
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getLoadedFieldSet
public LoadedFieldSet getLoadedFieldSet(Method method)(Code)
Get the set of fields loaded by given method.
Parameters:
  method - the method the set of fields loaded by the method



getLockChecker
public LockChecker getLockChecker(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get LockChecker for method. This is like LockDataflow, but may be able to avoid performing the actual dataflow analyses if the method doesn't contain explicit monitorenter/monitorexit instructions.
Parameters:
  method - the method the LockChecker
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getLockDataflow
public LockDataflow getLockDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get dataflow for LockAnalysis for given method.
Parameters:
  method - the method the LockDataflow



getLookupFailureCallback
public RepositoryLookupFailureCallback getLookupFailureCallback()(Code)
Get the RepositoryLookupFailureCallback. the RepositoryLookupFailureCallback



getLoopExitBranches
public static Set<Integer> getLoopExitBranches(Method method, MethodGen methodGen)(Code)



getMethod
public Method getMethod(MethodGen methodGen)(Code)
Look up the Method represented by given MethodGen.
Parameters:
  methodGen - a MethodGen the Method represented by the MethodGen



getMethodAnalysis
public Object getMethodAnalysis(Class analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException(Code)
Retrieve a method analysis object.
Parameters:
  analysisClass - class the method analysis object should belong to
Parameters:
  methodDescriptor - method descriptor identifying the analyzed method the analysis object
throws:
  CheckedAnalysisException -



getMethodGen
public MethodGen getMethodGen(Method method)(Code)
Get a MethodGen object for given method.
Parameters:
  method - the method the MethodGen object for the method, or nullif the method has no Code attribute (and thus cannot be analyzed)or if the method seems unprofitable to analyze



getMethodsInCallOrder
public List<Method> getMethodsInCallOrder()(Code)



getNonExceptionDominatorsAnalysis
public DominatorsAnalysis getNonExceptionDominatorsAnalysis(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get DominatorsAnalysis for given method, where exception edges are ignored.
Parameters:
  method - the method the DominatorsAnalysis



getNonExceptionPostDominatorsAnalysis
public PostDominatorsAnalysis getNonExceptionPostDominatorsAnalysis(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get PostDominatorsAnalysis for given method, where exception edges are ignored.
Parameters:
  method - the method the PostDominatorsAnalysis



getNonImplicitExceptionDominatorsAnalysis
public PostDominatorsAnalysis getNonImplicitExceptionDominatorsAnalysis(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get DominatorsAnalysis for given method, where implicit exception edges are ignored.
Parameters:
  method - the method the DominatorsAnalysis



getObjectMap
public Map<MethodDescriptor, Object> getObjectMap(Class analysisClass)(Code)



getOffsetToOpcodeMap
public short[] getOffsetToOpcodeMap(Method method)(Code)
Get array mapping bytecode offsets to opcodes for given method. Array elements containing zero are either not valid instruction offsets, or contain a NOP instruction. (It is convenient not to distinguish these cases.)
Parameters:
  method - the method map of bytecode offsets to opcodes, or null if the method has no code



getParameterSignatureList
public String[] getParameterSignatureList(Method method)(Code)
Get array of type signatures of parameters for given method.
Parameters:
  method - the method an array of type signatures indicating the typesof the method's parameters



getReturnPathDataflow
public ReturnPathDataflow getReturnPathDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get ReturnPathDataflow for method.
Parameters:
  method - the method the ReturnPathDataflow



getReturnPathTypeDataflow
public ReturnPathTypeDataflow getReturnPathTypeDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get ReturnPathTypeDataflow for a method.
Parameters:
  method - the method the ReturnPathTypeDataflow for the method
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getReverseDepthFirstSearch
public ReverseDepthFirstSearch getReverseDepthFirstSearch(Method method) throws CFGBuilderException(Code)
Get a ReverseDepthFirstSearch for given method.
Parameters:
  method - the method the ReverseDepthFirstSearch



getStoreDataflow
public StoreDataflow getStoreDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get store dataflow.
Parameters:
  method - the method the StoreDataflow
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getTypeDataflow
public TypeDataflow getTypeDataflow(Method method) throws DataflowAnalysisException, CFGBuilderException(Code)
Get a TypeDataflow for given method.
Parameters:
  method - the method the TypeDataflow



getUnconditionalValueDerefDataflow
public UnconditionalValueDerefDataflow getUnconditionalValueDerefDataflow(Method method) throws CFGBuilderException, DataflowAnalysisException(Code)
Get the UnconditionalValueDerefDataflow for a method.
Parameters:
  method - the method the UnconditionalValueDerefDataflow
throws:
  CFGBuilderException -
throws:
  DataflowAnalysisException -



getUsagesRequiringNonNullValues
public UsagesRequiringNonNullValues getUsagesRequiringNonNullValues(Method method) throws DataflowAnalysisException, CFGBuilderException(Code)
Get a UsagesRequiringNonNullValues for given method.
Parameters:
  method - the method the UsagesRequiringNonNullValues



getValueNumberDataflow
public ValueNumberDataflow getValueNumberDataflow(Method method) throws DataflowAnalysisException, CFGBuilderException(Code)
Get a ValueNumberDataflow for given method.
Parameters:
  method - the method the ValueNumberDataflow



getXClass
public XClass getXClass()(Code)



indent
public static void indent()(Code)



linesMentionedMultipleTimes
public static BitSet linesMentionedMultipleTimes(Method method)(Code)



purgeAllMethodAnalyses
public void purgeAllMethodAnalyses()(Code)



purgeMethodAnalyses
public void purgeMethodAnalyses(MethodDescriptor methodDescriptor)(Code)
Purge all CFG-based method analyses for given method.
Parameters:
  methodDescriptor - method descriptor identifying method to purge



putMethodAnalysis
public void putMethodAnalysis(Class analysisClass, MethodDescriptor methodDescriptor, Object object)(Code)
Store a method analysis object. Note that the cached analysis object could be a special value (indicating null or an exception).
Parameters:
  analysisClass - class the method analysis object belongs to
Parameters:
  methodDescriptor - method descriptor identifying the analyzed method
Parameters:
  object - the analysis object to cache



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.