Source Code Cross Referenced for ContinueStatement.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » core » dom » 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 » IDE Eclipse » jdt » org.eclipse.jdt.core.dom 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 2006 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.jdt.core.dom;
011:
012:        import java.util.ArrayList;
013:        import java.util.List;
014:
015:        /**
016:         * Continue statement AST node type.
017:         *
018:         * <pre>
019:         * ContinueStatement:
020:         *    <b>continue</b> [ Identifier ] <b>;</b>
021:         * </pre>
022:         * 
023:         * @since 2.0
024:         */
025:        public class ContinueStatement extends Statement {
026:
027:            /**
028:             * The "label" structural property of this node type.
029:             * @since 3.0
030:             */
031:            public static final ChildPropertyDescriptor LABEL_PROPERTY = new ChildPropertyDescriptor(
032:                    ContinueStatement.class,
033:                    "label", SimpleName.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
034:
035:            /**
036:             * A list of property descriptors (element type: 
037:             * {@link StructuralPropertyDescriptor}),
038:             * or null if uninitialized.
039:             */
040:            private static final List PROPERTY_DESCRIPTORS;
041:
042:            static {
043:                List properyList = new ArrayList(2);
044:                createPropertyList(ContinueStatement.class, properyList);
045:                addProperty(LABEL_PROPERTY, properyList);
046:                PROPERTY_DESCRIPTORS = reapPropertyList(properyList);
047:            }
048:
049:            /**
050:             * Returns a list of structural property descriptors for this node type.
051:             * Clients must not modify the result.
052:             * 
053:             * @param apiLevel the API level; one of the
054:             * <code>AST.JLS*</code> constants
055:
056:             * @return a list of property descriptors (element type: 
057:             * {@link StructuralPropertyDescriptor})
058:             * @since 3.0
059:             */
060:            public static List propertyDescriptors(int apiLevel) {
061:                return PROPERTY_DESCRIPTORS;
062:            }
063:
064:            /**
065:             * The label, or <code>null</code> if none; none by default.
066:             */
067:            private SimpleName optionalLabel = null;
068:
069:            /**
070:             * Creates a new unparented continue statement node owned by the given 
071:             * AST. By default, the continue statement has no label.
072:             * <p>
073:             * N.B. This constructor is package-private.
074:             * </p>
075:             * 
076:             * @param ast the AST that is to own this node
077:             */
078:            ContinueStatement(AST ast) {
079:                super (ast);
080:            }
081:
082:            /* (omit javadoc for this method)
083:             * Method declared on ASTNode.
084:             */
085:            final List internalStructuralPropertiesForType(int apiLevel) {
086:                return propertyDescriptors(apiLevel);
087:            }
088:
089:            /* (omit javadoc for this method)
090:             * Method declared on ASTNode.
091:             */
092:            final ASTNode internalGetSetChildProperty(
093:                    ChildPropertyDescriptor property, boolean get, ASTNode child) {
094:                if (property == LABEL_PROPERTY) {
095:                    if (get) {
096:                        return getLabel();
097:                    } else {
098:                        setLabel((SimpleName) child);
099:                        return null;
100:                    }
101:                }
102:                // allow default implementation to flag the error
103:                return super .internalGetSetChildProperty(property, get, child);
104:            }
105:
106:            /* (omit javadoc for this method)
107:             * Method declared on ASTNode.
108:             */
109:            final int getNodeType0() {
110:                return CONTINUE_STATEMENT;
111:            }
112:
113:            /* (omit javadoc for this method)
114:             * Method declared on ASTNode.
115:             */
116:            ASTNode clone0(AST target) {
117:                ContinueStatement result = new ContinueStatement(target);
118:                result
119:                        .setSourceRange(this .getStartPosition(), this 
120:                                .getLength());
121:                result.copyLeadingComment(this );
122:                result.setLabel((SimpleName) ASTNode.copySubtree(target,
123:                        getLabel()));
124:                return result;
125:            }
126:
127:            /* (omit javadoc for this method)
128:             * Method declared on ASTNode.
129:             */
130:            final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
131:                // dispatch to correct overloaded match method
132:                return matcher.match(this , other);
133:            }
134:
135:            /* (omit javadoc for this method)
136:             * Method declared on ASTNode.
137:             */
138:            void accept0(ASTVisitor visitor) {
139:                boolean visitChildren = visitor.visit(this );
140:                if (visitChildren) {
141:                    acceptChild(visitor, getLabel());
142:                }
143:                visitor.endVisit(this );
144:            }
145:
146:            /**
147:             * Returns the label of this continue statement, or <code>null</code> if
148:             * there is none.
149:             * 
150:             * @return the label, or <code>null</code> if there is none
151:             */
152:            public SimpleName getLabel() {
153:                return this .optionalLabel;
154:            }
155:
156:            /**
157:             * Sets or clears the label of this continue statement.
158:             * 
159:             * @param label the label, or <code>null</code> if 
160:             *    there is none
161:             * @exception IllegalArgumentException if:
162:             * <ul>
163:             * <li>the node belongs to a different AST</li>
164:             * <li>the node already has a parent</li>
165:             * </ul>
166:             */
167:            public void setLabel(SimpleName label) {
168:                ASTNode oldChild = this .optionalLabel;
169:                preReplaceChild(oldChild, label, LABEL_PROPERTY);
170:                this .optionalLabel = label;
171:                postReplaceChild(oldChild, label, LABEL_PROPERTY);
172:            }
173:
174:            /* (omit javadoc for this method)
175:             * Method declared on ASTNode.
176:             */
177:            int memSize() {
178:                return super .memSize() + 1 * 4;
179:            }
180:
181:            /* (omit javadoc for this method)
182:             * Method declared on ASTNode.
183:             */
184:            int treeSize() {
185:                return memSize()
186:                        + (optionalLabel == null ? 0 : getLabel().treeSize());
187:            }
188:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.