Java Doc for Trace.java in  » Testing » TT » U2 » T2 » 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 » Testing » TT » U2.T2 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   U2.T2.Trace

Trace
public class Trace implements Serializable(Code)
This class provides a meta representation of execution. An instance of this class is called an execution trace. It is a meta representation of an actual execution. For the big picture, see the doc of the U2.T2 U2.T2 package . The important thing is that from an execution trace we can reproduce the actual execution. It can also be saved and reloaded; thus allowing us to later on replay the actual execution.

A trace consists of a creation step, that creates the target object, and a sequence of subsequent U2.T2.Trace.TraceStep trace steps , each doing something on the target object, e.g. calling a method on it. The creation step is an instance of so called a U2.T2.Trace.MkValStep MkVal step. A MkVal step is used to create an object, whereas a trace step is used to apply side effect on the target object. A trace step may also consist of MkVal steps, e.g. when it needs to create objects to pass as parameters to a method.


Inner Class :abstract public static class MkValStep implements Serializable
Inner Class :public static class REF extends MkValStep
Inner Class :public static class CONST extends MkValStep
Inner Class :public static class CREATE_TARGET_OBJECT extends MkValStep
Inner Class :public static class CREATE_COLLECTION_LIKE extends MkValStep
Inner Class :abstract public static class TraceStep implements Serializable
Inner Class :public static class UPDATE_FIELD extends TraceStep
Inner Class :public static class CALL_METHOD extends TraceStep
Inner Class :public static class ExecResult

Field Summary
final public static  StringARRAY
     Code.
public static  StringVIOLATING_TRACE
    
 Stringclassification
     Used to classify different kind of traces, e.g.
 MkValStepcreation
     The creation step that starts this execution trace.
 intindexOfTargetObj
     The target object of this execution trace.
 booleanprintIntermediateStepsOption
    
 booleanprintMethodParamsOption
    
 intshowDepth
    
 LinkedList<TraceStep>trace
     The sequence of trace steps belonging to this execution trace.

Constructor Summary
public  Trace()
     Create an empty execution trace.

Method Summary
public static  ExecResultMkTargetObject(Pool pool, MkValStep step, Method classinv)
     As MkVal, but especially for constructing a target object.
public static  ObjectMkVal(Pool pool, MkValStep step)
     Execute a given MkVal step to construct an object.
public static  Object[]MkVal(Pool pool, MkValStep[] steps)
     As the other MkVal, but this one executes multiple steps.
public static  ExecResultexec(Pool pool, Object targetObj, TraceStep step, Method classinv, PrintStream out, boolean printMethodParamsOption, Show Shower)
     Execute a given trace step.
public static  ExecResultexec(Pool pool, Object targetObj, TraceStep step, Method classinv)
     As the other exec, but this does not produce report.
public static  voidexecClassInv(Method classinv, Object targetObj, ExecResult result)
     Execute (and check) the given class invariant.
Parameters:
  classinv - The method specifying the class invariant.
Parameters:
  result - Information about violations found will be put in here.
public static  LinkedList<Trace>load(Class CUT)
     For loading execution traces from a single save-file.
public static  voidmain(String[] args)
    
public  voidreport(Pool pool, Method classinv, PrintStream out)
     This method is used to report the states, methods called, parameters passed along an execution induced by a trace.
public static  voidsave(Class CUT, LinkedList<Trace> traces)
     For saving execution traces.
protected static  voidupdate_aux_laststep(Object targetObj, String step)
     Method to fill-in the aux_laststep hook.

Field Detail
ARRAY
final public static String ARRAY(Code)
Code.



VIOLATING_TRACE
public static String VIOLATING_TRACE(Code)
Currently this is the only classification :)



classification
String classification(Code)
Used to classify different kind of traces, e.g. to distinguish violating and non-violating traces. The purpose of this field is mainly to quickly filter traces without having to execute them.



creation
MkValStep creation(Code)
The creation step that starts this execution trace.



indexOfTargetObj
int indexOfTargetObj(Code)
The target object of this execution trace.



printIntermediateStepsOption
boolean printIntermediateStepsOption(Code)



printMethodParamsOption
boolean printMethodParamsOption(Code)



showDepth
int showDepth(Code)



trace
LinkedList<TraceStep> trace(Code)
The sequence of trace steps belonging to this execution trace.




Constructor Detail
Trace
public Trace()(Code)
Create an empty execution trace.




Method Detail
MkTargetObject
public static ExecResult MkTargetObject(Pool pool, MkValStep step, Method classinv) throws InvocationTargetException(Code)
As MkVal, but especially for constructing a target object. It will also execute the classinvariant.



MkVal
public static Object MkVal(Pool pool, MkValStep step) throws InvocationTargetException(Code)
Execute a given MkVal step to construct an object.



MkVal
public static Object[] MkVal(Pool pool, MkValStep[] steps) throws InvocationTargetException(Code)
As the other MkVal, but this one executes multiple steps.



exec
public static ExecResult exec(Pool pool, Object targetObj, TraceStep step, Method classinv, PrintStream out, boolean printMethodParamsOption, Show Shower)(Code)
Execute a given trace step. If a printstream is also given, this methdo will also report the execution to the stream.
Parameters:
  out - If not null will cause objects involed in this step to be textually reported to this print stream.
Parameters:
  printMethodParamsOption - If true, and if this step is a methodcalls, the parameters to the call will be printedin the report.
Parameters:
  Shower - A shower object need to be passed; it is used toshow (print) an object, but we also need to maintain objectnumbering across different the entire execution; the showobject internally maintains this numbering.



exec
public static ExecResult exec(Pool pool, Object targetObj, TraceStep step, Method classinv)(Code)
As the other exec, but this does not produce report.



execClassInv
public static void execClassInv(Method classinv, Object targetObj, ExecResult result)(Code)
Execute (and check) the given class invariant.
Parameters:
  classinv - The method specifying the class invariant.
Parameters:
  result - Information about violations found will be put in here.



load
public static LinkedList<Trace> load(Class CUT) throws T2Exception(Code)
For loading execution traces from a single save-file. The file is assumed to be called name.tr where name is CUT's simple name.
Parameters:
  CUT - The target class to which the traces belong.



main
public static void main(String[] args)(Code)



report
public void report(Pool pool, Method classinv, PrintStream out)(Code)
This method is used to report the states, methods called, parameters passed along an execution induced by a trace. Note that to be able to do so, the execution has to be reconstructed. Violations will not be checked. This is assumed to has been done by whatever phases that preceed reporting.
Parameters:
  pool - Pass here the same pool as used to produce thisexecution trace.
Parameters:
  out - The steam to which the report will be printed;should not be null.



save
public static void save(Class CUT, LinkedList<Trace> traces) throws T2Exception(Code)
For saving execution traces. They will be saved in the file name.tr where name is CUT's simple name.
Parameters:
  CUT - The target class to which the traces belong.



update_aux_laststep
protected static void update_aux_laststep(Object targetObj, String step)(Code)
Method to fill-in the aux_laststep hook.



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.