Source Code Cross Referenced for Type.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, 2005 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:        /**
013:         * Abstract base class of all type AST node types. A type node represents a 
014:         * reference to a primitive type (including void), to an array type, or to a
015:         * simple named type (or type variable), to a qualified type, to a
016:         * parameterized type, or to a wildcard type. Note that not all of these
017:         * are meaningful in all contexts; for example, a wildcard type is only
018:         * meaningful in the type argument position of a parameterized type.
019:         * <p>
020:         * <pre>
021:         * Type:
022:         *    PrimitiveType
023:         *    ArrayType
024:         *    SimpleType
025:         *    QualifiedType
026:         *    ParameterizedType
027:         *    WildcardType
028:         * PrimitiveType:
029:         *    <b>byte</b>
030:         *    <b>short</b>
031:         *    <b>char</b>
032:         *    <b>int</b>
033:         *    <b>long</b>
034:         *    <b>float</b>
035:         *    <b>double</b>
036:         *    <b>boolean</b>
037:         *    <b>void</b>
038:         * ArrayType:
039:         *    Type <b>[</b> <b>]</b>
040:         * SimpleType:
041:         *    TypeName
042:         * ParameterizedType:
043:         *    Type <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b>
044:         * QualifiedType:
045:         *    Type <b>.</b> SimpleName
046:         * WildcardType:
047:         *    <b>?</b> [ ( <b>extends</b> | <b>super</b>) Type ] 
048:         * </pre>
049:         * </p>
050:         * 
051:         * @since 2.0
052:         */
053:        public abstract class Type extends ASTNode {
054:
055:            /**
056:             * Creates a new AST node for a type owned by the given AST.
057:             * <p>
058:             * N.B. This constructor is package-private.
059:             * </p>
060:             * 
061:             * @param ast the AST that is to own this node
062:             */
063:            Type(AST ast) {
064:                super (ast);
065:            }
066:
067:            /**
068:             * Returns whether this type is a primitive type
069:             * (<code>PrimitiveType</code>). 
070:             * 
071:             * @return <code>true</code> if this is a primitive type, and 
072:             *    <code>false</code> otherwise
073:             */
074:            public final boolean isPrimitiveType() {
075:                return (this  instanceof  PrimitiveType);
076:            }
077:
078:            /**
079:             * Returns whether this type is a simple type 
080:             * (<code>SimpleType</code>).
081:             * 
082:             * @return <code>true</code> if this is a simple type, and 
083:             *    <code>false</code> otherwise
084:             */
085:            public final boolean isSimpleType() {
086:                return (this  instanceof  SimpleType);
087:            }
088:
089:            /**
090:             * Returns whether this type is an array type
091:             * (<code>ArrayType</code>).
092:             * 
093:             * @return <code>true</code> if this is an array type, and 
094:             *    <code>false</code> otherwise
095:             */
096:            public final boolean isArrayType() {
097:                return (this  instanceof  ArrayType);
098:            }
099:
100:            /**
101:             * Returns whether this type is a parameterized type
102:             * (<code>ParameterizedType</code>). 
103:             * 
104:             * @return <code>true</code> if this is a parameterized type, and 
105:             *    <code>false</code> otherwise
106:             * @since 3.1
107:             */
108:            public final boolean isParameterizedType() {
109:                return (this  instanceof  ParameterizedType);
110:            }
111:
112:            /**
113:             * Returns whether this type is a qualified type
114:             * (<code>QualifiedType</code>). 
115:             * <p>
116:             * Note that a type like "A.B" can be represented either of two ways:
117:             * <ol>
118:             * <li>
119:             * <code>QualifiedType(SimpleType(SimpleName("A")),SimpleName("B"))</code>
120:             * </li>
121:             * <li>
122:             * <code>SimpleType(QualifiedName(SimpleName("A"),SimpleName("B")))</code>
123:             * </li>
124:             * </ol>
125:             * The first form is preferred when "A" is known to be a type. However, a 
126:             * parser cannot always determine this. Clients should be prepared to handle
127:             * either rather than make assumptions. (Note also that the first form
128:             * became possible as of JLS3; only the second form existed in the 
129:             * JLS2 API.)
130:             * </p>
131:             * 
132:             * @return <code>true</code> if this is a qualified type, and 
133:             *    <code>false</code> otherwise
134:             * @since 3.1
135:             */
136:            public final boolean isQualifiedType() {
137:                return (this  instanceof  QualifiedType);
138:            }
139:
140:            /**
141:             * Returns whether this type is a wildcard type
142:             * (<code>WildcardType</code>).
143:             * <p>
144:             * Note that a wildcard type is only meaningful as a 
145:             * type argument of a <code>ParameterizedType</code> node.
146:             * </p>
147:             * 
148:             * @return <code>true</code> if this is a wildcard type, and 
149:             *    <code>false</code> otherwise
150:             * @since 3.1
151:             */
152:            public final boolean isWildcardType() {
153:                return (this  instanceof  WildcardType);
154:            }
155:
156:            /**
157:             * Resolves and returns the binding for this type.
158:             * <p>
159:             * Note that bindings are generally unavailable unless requested when the
160:             * AST is being built.
161:             * </p>
162:             * 
163:             * @return the type binding, or <code>null</code> if the binding cannot be 
164:             *    resolved
165:             */
166:            public final ITypeBinding resolveBinding() {
167:                return this.ast.getBindingResolver().resolveType(this);
168:            }
169:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.