Source Code Cross Referenced for MethodNode.java in  » Code-Analyzer » JBlanket » csdl » jblanket » app » tree » 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 » JBlanket » csdl.jblanket.app.tree 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package csdl.jblanket.app.tree;
002:
003:        import csdl.jblanket.app.MethodCategoryColor;
004:
005:        import java.awt.Color;
006:        import java.util.List;
007:
008:        /**
009:         * Implements the Nodes that represents methods.
010:         * <p>
011:         * A <code>MethodNode</code> contains the type signature of the method it represents as well as
012:         * information about whether the method was tested or untested, and is a one-line method,
013:         * constructor, etc.  See the <code>MethodCategoryColor</code> class for Font colors used.
014:         * 
015:         * @author Joy M. Agustin
016:         * @version $Id: MethodNode.java,v 1.1 2004/11/07 00:32:40 timshadel Exp $
017:         */
018:        public class MethodNode extends Node {
019:
020:            /** Color representing the category of this node depending on the XML file */
021:            private Color origColor;
022:            /** Color representing the category of this node as displayed in the application */
023:            private Color newColor;
024:
025:            /** Describes if the method represented by this node was invoked during testing */
026:            private boolean tested;
027:            /** List of method's parameters */
028:            private List parameters;
029:
030:            /**
031:             * Constructs an untested MethodNode object for method with type signature
032:             * <code>name</code>(<code>parameters</code>).
033:             * 
034:             * @param name the name of the method.
035:             * @param parameters the list of <code>name</code>'s parameters.
036:             */
037:            public MethodNode(String name, List parameters) {
038:                super (name);
039:
040:                this .origColor = Color.black;
041:                this .newColor = null;
042:
043:                this .tested = false;
044:                this .parameters = parameters;
045:            }
046:
047:            /**
048:             * Gets the color of the node as displayed in the application.
049:             * 
050:             * @return the color of the node in the application.
051:             */
052:            public Color getNewColor() {
053:                return this .newColor;
054:            }
055:
056:            /**
057:             * Gets the color of the node from the XML file.
058:             * 
059:             * @return the color of the node from the COVER-MethodSets.xml file.
060:             */
061:            public Color getOrigColor() {
062:                return this .origColor;
063:            }
064:
065:            /**
066:             * Describes whether this method was individually excluded.
067:             * 
068:             * @return true if the method was individually excluded, false otherwise.
069:             */
070:            public boolean isIndividualExclude() {
071:                return this .newColor == MethodCategoryColor.EXCLUDED_INDIVIDUAL
072:                        .getColor();
073:            }
074:
075:            /**
076:             * Describes whether this method was invoked during testing.
077:             * 
078:             * @return true if the method was tested, false otherwise.
079:             */
080:            public boolean isTested() {
081:                return this .tested;
082:            }
083:
084:            /**
085:             * Sets the color of the this node as displayed in the application.
086:             * 
087:             * @param color the new category color.
088:             */
089:            public void setNewColor(Color color) {
090:                this .newColor = color;
091:            }
092:
093:            /**
094:             * Sets this method as a one-line method.
095:             */
096:            public void setOneLineMethod() {
097:                this .origColor = MethodCategoryColor.ONE_LINE.getColor();
098:                this .newColor = MethodCategoryColor.ONE_LINE.getColor();
099:            }
100:
101:            /**
102:             * Sets this method as a constructor.
103:             */
104:            public void setConstructor() {
105:                this .origColor = MethodCategoryColor.CONSTRUCTOR.getColor();
106:                this .newColor = MethodCategoryColor.CONSTRUCTOR.getColor();
107:            }
108:
109:            /**
110:             * Sets this method as an individually excluded method.
111:             */
112:            public void setIndividualExclude() {
113:                this .origColor = MethodCategoryColor.EXCLUDED_INDIVIDUAL
114:                        .getColor();
115:                this .newColor = MethodCategoryColor.EXCLUDED_INDIVIDUAL
116:                        .getColor();
117:            }
118:
119:            /**
120:             * Sets this method as tested.
121:             */
122:            public void setTested() {
123:                this .tested = true;
124:            }
125:
126:            /**
127:             * Sets this method as untested.
128:             */
129:            public void setUntested() {
130:                this .tested = false;
131:            }
132:
133:            /**
134:             * Returns the type signature of the method this node represents.
135:             * 
136:             * @return the type signature.
137:             */
138:            public String toString() {
139:                StringBuffer buffer = new StringBuffer(super .toString() + "(");
140:                for (int i = 0; i < this .parameters.size(); i++) {
141:                    if (i > 0) {
142:                        buffer.append(", ");
143:                    }
144:                    buffer.append(this .parameters.get(i));
145:                }
146:                buffer.append(")");
147:                return buffer.toString();
148:            }
149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.