Java Doc for CompilationUnit.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 Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jdt.core.dom.ASTNode
      org.eclipse.jdt.core.dom.CompilationUnit

CompilationUnit
public class CompilationUnit extends ASTNode (Code)
Java compilation unit AST node type. This is the type of the root of an AST.

The source range for this type of node is ordinarily the entire source file, including leading and trailing whitespace and comments.

For JLS2:
 CompilationUnit:
 [ PackageDeclaration ]
 { ImportDeclaration }
 { TypeDeclaration | ; }
 
For JLS3, the kinds of type declarations grew to include enum and annotation type declarations:
 CompilationUnit:
 [ PackageDeclaration ]
 { ImportDeclaration }
 { TypeDeclaration | EnumDeclaration | AnnotationTypeDeclaration | ; }
 

since:
   2.0


Field Summary
final public static  ChildListPropertyDescriptorIMPORTS_PROPERTY
     The "imports" structural property of this node type.
final public static  ChildPropertyDescriptorPACKAGE_PROPERTY
     The "package" structural property of this node type.
final public static  ChildListPropertyDescriptorTYPES_PROPERTY
     The "types" structural property of this node type.
 Comment[]optionalCommentTable
     The comment table, or null if none; initially null.

Constructor Summary
 CompilationUnit(AST ast)
     Creates a new AST node for a compilation owned by the given AST. The compilation unit initially has no package declaration, no import declarations, and no type declarations.

N.B.


Method Summary
 voidaccept0(ASTVisitor visitor)
    
 ASTNodeclone0(AST target)
    
public  ASTNodefindDeclaringNode(IBinding binding)
     Finds the corresponding AST node in the given compilation unit from which the given binding originated.
public  ASTNodefindDeclaringNode(String key)
     Finds the corresponding AST node in the given compilation unit from which the binding with the given key originated.
public  intfirstLeadingCommentIndex(ASTNode node)
     Return the index in the whole comments list CompilationUnit.getCommentList() of the first leading comments associated with the given node.
public  intgetColumnNumber(int position)
     Returns the column number corresponding to the given source character position in the original source string.
public  ListgetCommentList()
     Returns a list of the comments encountered while parsing this compilation unit.

Since the Java language allows comments to appear most anywhere in the source text, it is problematic to locate comments in relation to the structure of an AST.

 DefaultCommentMappergetCommentMapper()
     Returns the internal comment mapper.
public  intgetExtendedLength(ASTNode node)
     Returns the extended source length of the given node.
public  intgetExtendedStartPosition(ASTNode node)
     Returns the extended start position of the given node.
public  IJavaElementgetJavaElement()
     The Java element (an org.eclipse.jdt.core.ICompilationUnit or an org.eclipse.jdt.core.IClassFile) this compilation unit was created from, or null if it was not created from a Java element.
public  intgetLineNumber(int position)
     Returns the line number corresponding to the given source character position in the original source string.
public  Message[]getMessages()
     Returns the list of messages reported by the compiler during the parsing or the type checking of this compilation unit.
final  intgetNodeType0()
    
public  PackageDeclarationgetPackage()
     Returns the node for the package declaration of this compilation unit, or null if this compilation unit is in the default package.
public  intgetPosition(int line, int column)
     Given a line number and column number, returns the corresponding position in the original source string. Returns -2 if no line number information is available for this compilation unit.
public  IProblem[]getProblems()
     Returns the list of detailed problem reports noted by the compiler during the parsing or the type checking of this compilation unit.
public  ITypeRootgetTypeRoot()
     The Java type root (a org.eclipse.jdt.core.ICompilationUnit compilation unit or a org.eclipse.jdt.core.IClassFile class file ) this compilation unit was created from, or null if it was not created from a Java type root.
public  Listimports()
     Returns the live list of nodes for the import declarations of this compilation unit, in order of appearance.
 voidinitCommentMapper(Scanner scanner)
     Initializes the internal comment mapper with the given scanner.
final  ListinternalGetChildListProperty(ChildListPropertyDescriptor property)
    
final  ASTNodeinternalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child)
    
final  ListinternalStructuralPropertiesForType(int apiLevel)
    
public  intlastTrailingCommentIndex(ASTNode node)
     Return the index in the whole comments list CompilationUnit.getCommentList() of the last trailing comments associated with the given node.
public  intlineNumber(int position)
     Returns the line number corresponding to the given source character position in the original source string.
 intmemSize()
    
public static  ListpropertyDescriptors(int apiLevel)
     Returns a list of structural property descriptors for this node type.
public  voidrecordModifications()
     Enables the recording of changes to this compilation unit and its descendents.
public  TextEditrewrite(IDocument document, Map options)
     Converts all modifications recorded for this compilation unit into an object representing the corresponding text edits to the given document containing the original source code for this compilation unit.

The compilation unit must have been created by ASTParser from the source code string in the given document, and recording must have been turned on with a prior call to recordModifications while the AST was still in its original state.

Calling this methods does not discard the modifications on record.

 voidsetCommentTable(Comment[] commentTable)
     Sets the list of the comments encountered while parsing this compilation unit.
 voidsetLineEndTable(int[] lineEndTable)
     Sets the line end table for this compilation unit. If lineEndTable[i] == p then line number i+1 ends at character position p.
public  voidsetPackage(PackageDeclaration pkgDecl)
     Sets or clears the package declaration of this compilation unit node to the given package declaration node.
 voidsetProblems(IProblem[] problems)
     Sets the array of problems reported by the compiler during the parsing or name resolution of this compilation unit.
 voidsetTypeRoot(ITypeRoot typeRoot)
     Sets the Java type root (a org.eclipse.jdt.core.ICompilationUnit compilation unit or a org.eclipse.jdt.core.IClassFile class file ) this compilation unit was created from, or null if it was not created from a Java type root.
final  booleansubtreeMatch0(ASTMatcher matcher, Object other)
    
 inttreeSize()
    
public  Listtypes()
     Returns the live list of nodes for the top-level type declarations of this compilation unit, in order of appearance.

Field Detail
IMPORTS_PROPERTY
final public static ChildListPropertyDescriptor IMPORTS_PROPERTY(Code)
The "imports" structural property of this node type.
since:
   3.0



PACKAGE_PROPERTY
final public static ChildPropertyDescriptor PACKAGE_PROPERTY(Code)
The "package" structural property of this node type.
since:
   3.0



TYPES_PROPERTY
final public static ChildListPropertyDescriptor TYPES_PROPERTY(Code)
The "types" structural property of this node type.
since:
   3.0



optionalCommentTable
Comment[] optionalCommentTable(Code)
The comment table, or null if none; initially null. This array is the storage underlying the optionalCommentList ArrayList.
since:
   3.0




Constructor Detail
CompilationUnit
CompilationUnit(AST ast)(Code)
Creates a new AST node for a compilation owned by the given AST. The compilation unit initially has no package declaration, no import declarations, and no type declarations.

N.B. This constructor is package-private; all subclasses must be declared in the same package; clients are unable to declare additional subclasses.


Parameters:
  ast - the AST that is to own this node




Method Detail
accept0
void accept0(ASTVisitor visitor)(Code)



clone0
ASTNode clone0(AST target)(Code)



findDeclaringNode
public ASTNode findDeclaringNode(IBinding binding)(Code)
Finds the corresponding AST node in the given compilation unit from which the given binding originated. Returns null if the binding does not correspond to any node in this compilation unit. This method always returns null if bindings were not requested when this AST was built.

The following table indicates the expected node type for the various different kinds of bindings:

  • package - a PackageDeclaration
  • class or interface - a TypeDeclaration or a AnonymousClassDeclaration (for anonymous classes)
  • primitive type - none
  • array type - none
  • field - a VariableDeclarationFragment in a FieldDeclaration
  • local variable - a SingleVariableDeclaration, or a VariableDeclarationFragment in a VariableDeclarationStatement or VariableDeclarationExpression
  • method - a MethodDeclaration
  • constructor - a MethodDeclaration
  • annotation type - an AnnotationTypeDeclaration
  • annotation type member - an AnnotationTypeMemberDeclaration
  • enum type - an EnumDeclaration
  • enum constant - an EnumConstantDeclaration
  • type variable - a TypeParameter
  • capture binding - none
  • annotation binding - an Annotation
  • member value pair binding - an MemberValuePair, or null if it represents a default value or a single member value
For parameterized or raw type bindings, the declaring node is that of the corresponding generic type. And for parameterized or raw method bindings, the declaring node is that of the corresponding generic method.

Each call to ASTParser.createAST(org.eclipse.core.runtime.IProgressMonitor) with a request for bindings gives rise to separate universe of binding objects. This method always returns null when the binding object comes from a different AST. Use findDeclaringNode(binding.getKey()) when the binding comes from a different AST.


Parameters:
  binding - the binding the corresponding node where the given binding is declared,or null if the binding does not correspond to a node in thiscompilation unit or if bindings were not requested when this AST was built
See Also:   CompilationUnit.findDeclaringNode(String)



findDeclaringNode
public ASTNode findDeclaringNode(String key)(Code)
Finds the corresponding AST node in the given compilation unit from which the binding with the given key originated. Returns null if the corresponding node cannot be determined. This method always returns null if bindings were not requested when this AST was built.

The following table indicates the expected node type for the various different kinds of binding keys:

  • package - a PackageDeclaration
  • class or interface - a TypeDeclaration or a AnonymousClassDeclaration (for anonymous classes)
  • primitive type - none
  • array type - none
  • field - a VariableDeclarationFragment in a FieldDeclaration
  • local variable - a SingleVariableDeclaration, or a VariableDeclarationFragment in a VariableDeclarationStatement or VariableDeclarationExpression
  • method - a MethodDeclaration
  • constructor - a MethodDeclaration
  • annotation type - an AnnotationTypeDeclaration
  • annotation type member - an AnnotationTypeMemberDeclaration
  • enum type - an EnumDeclaration
  • enum constant - an EnumConstantDeclaration
  • type variable - a TypeParameter
  • capture binding - none
For parameterized or raw type bindings, the declaring node is that of the corresponding generic type. And for parameterized or raw method bindings, the declaring node is that of the corresponding generic method.


Parameters:
  key - the binding key, or null the corresponding node where a binding with the givenkey is declared, or null if the key is nullor if the key does not correspond to a node in this compilation unitor if bindings were not requested when this AST was built
See Also:   IBinding.getKey
since:
   2.1



firstLeadingCommentIndex
public int firstLeadingCommentIndex(ASTNode node)(Code)
Return the index in the whole comments list CompilationUnit.getCommentList() of the first leading comments associated with the given node.
Parameters:
  node - the node 0-based index of first leading comment or -1 if node has no associatedcomment before its start position.
since:
   3.2



getColumnNumber
public int getColumnNumber(int position)(Code)
Returns the column number corresponding to the given source character position in the original source string. Column number are zero-based. Return -1 if it is beyond the valid range or -2 if the column number information is unknown.
Parameters:
  position - a 0-based character position, possiblynegative or out of range the 0-based column number, or -1 if the characterposition does not correspond to a source line in the originalsource file or -2 if column number information is unknown for thiscompilation unit
See Also:   ASTParser
since:
   3.2



getCommentList
public List getCommentList()(Code)
Returns a list of the comments encountered while parsing this compilation unit.

Since the Java language allows comments to appear most anywhere in the source text, it is problematic to locate comments in relation to the structure of an AST. The one exception is doc comments which, by convention, immediately precede type, field, and method declarations; these comments are located in the AST by BodyDeclaration.getJavadoc BodyDeclaration.getJavadoc . Other comments do not show up in the AST. The table of comments is provided for clients that need to find the source ranges of all comments in the original source string. It includes entries for comments of all kinds (line, block, and doc), arranged in order of increasing source position.

Note on comment parenting: The ASTNode.getParent getParent() of a doc comment associated with a body declaration is the body declaration node; for these comment nodes ASTNode.getRoot getRoot() will return the compilation unit (assuming an unmodified AST) reflecting the fact that these nodes are property located in the AST for the compilation unit. However, for other comment nodes, ASTNode.getParent getParent() will return null, and ASTNode.getRoot getRoot() will return the comment node itself, indicating that these comment nodes are not directly connected to the AST for the compilation unit. The Comment.getAlternateRoot Comment.getAlternateRoot method provides a way to navigate from a comment to its compilation unit.

A note on visitors: The only comment nodes that will be visited when visiting a compilation unit are the doc comments parented by body declarations. To visit all comments in normal reading order, iterate over the comment table and call ASTNode.accept(ASTVisitor) accept on each element.

Clients cannot modify the resulting list.

an unmodifiable list of comments in increasing order of sourcestart position, or null if comment informationfor this compilation unit is not available
See Also:   ASTParser
since:
   3.0



getCommentMapper
DefaultCommentMapper getCommentMapper()(Code)
Returns the internal comment mapper. the comment mapper, or null if none.
since:
   3.0



getExtendedLength
public int getExtendedLength(ASTNode node)(Code)
Returns the extended source length of the given node. Unlike ASTNode.getStartPosition and ASTNode.getLength , the extended source range may include comments and whitespace immediately before or after the normal source range for the node.
Parameters:
  node - the node a (possibly 0) length, or 0if no source position information is recorded for this node
See Also:   CompilationUnit.getExtendedStartPosition(ASTNode)
since:
   3.0



getExtendedStartPosition
public int getExtendedStartPosition(ASTNode node)(Code)
Returns the extended start position of the given node. Unlike ASTNode.getStartPosition and ASTNode.getLength , the extended source range may include comments and whitespace immediately before or after the normal source range for the node.
Parameters:
  node - the node the 0-based character index, or -1if no source position information is recorded for this node
See Also:   CompilationUnit.getExtendedLength(ASTNode)
since:
   3.0



getJavaElement
public IJavaElement getJavaElement()(Code)
The Java element (an org.eclipse.jdt.core.ICompilationUnit or an org.eclipse.jdt.core.IClassFile) this compilation unit was created from, or null if it was not created from a Java element. the Java element this compilation unit was created from, or null if none
since:
   3.1
See Also:   CompilationUnit.getTypeRoot()



getLineNumber
public int getLineNumber(int position)(Code)
Returns the line number corresponding to the given source character position in the original source string. The initial line of the compilation unit is numbered 1, and each line extends through the last character of the end-of-line delimiter. The very last line extends through the end of the source string and has no line delimiter. For example, the source string class A\n{\n} has 3 lines corresponding to inclusive character ranges [0,7], [8,9], and [10,10]. Returns -1 for a character position that does not correspond to any source line, or -2 if no line number information is available for this compilation unit.
Parameters:
  position - a 0-based character position, possiblynegative or out of range the 1-based line number, or -1 if the characterposition does not correspond to a source line in the originalsource file or -2 if line number information is not known for thiscompilation unit
See Also:   ASTParser
since:
   3.2



getMessages
public Message[] getMessages()(Code)
Returns the list of messages reported by the compiler during the parsing or the type checking of this compilation unit. This list might be a subset of errors detected and reported by a Java compiler.

This list of messages is suitable for simple clients that do little more than log the messages or display them to the user. Clients that need further details should call getProblems to get compiler problem objects.

the list of messages, possibly empty
See Also:   CompilationUnit.getProblems()
See Also:   ASTParser



getNodeType0
final int getNodeType0()(Code)



getPackage
public PackageDeclaration getPackage()(Code)
Returns the node for the package declaration of this compilation unit, or null if this compilation unit is in the default package. the package declaration node, or null if none



getPosition
public int getPosition(int line, int column)(Code)
Given a line number and column number, returns the corresponding position in the original source string. Returns -2 if no line number information is available for this compilation unit. Returns the total size of the source string if line is greater than the actual number lines in the unit. Returns -1 if column is less than 0, or the position of the last character of the line if column is beyond the legal range, or the given line number is less than one.
Parameters:
  line - the one-based line number
Parameters:
  column - the zero-based column number the 0-based character position in the source string; -2 if line/column number information is not known for this compilation unit or -1 the inputs are not valid
since:
   3.2



getProblems
public IProblem[] getProblems()(Code)
Returns the list of detailed problem reports noted by the compiler during the parsing or the type checking of this compilation unit. This list might be a subset of errors detected and reported by a Java compiler.

Simple clients that do little more than log the messages or display them to the user should probably call getMessages instead.

the list of detailed problem objects, possibly empty
See Also:   CompilationUnit.getMessages()
See Also:   ASTParser
since:
   2.1



getTypeRoot
public ITypeRoot getTypeRoot()(Code)
The Java type root (a org.eclipse.jdt.core.ICompilationUnit compilation unit or a org.eclipse.jdt.core.IClassFile class file ) this compilation unit was created from, or null if it was not created from a Java type root. the Java type root this compilation unit was created from, or null if none
since:
   3.3



imports
public List imports()(Code)
Returns the live list of nodes for the import declarations of this compilation unit, in order of appearance. the live list of import declaration nodes(elementType: ImportDeclaration)



initCommentMapper
void initCommentMapper(Scanner scanner)(Code)
Initializes the internal comment mapper with the given scanner.
Parameters:
  scanner - the scanner
since:
   3.0



internalGetChildListProperty
final List internalGetChildListProperty(ChildListPropertyDescriptor property)(Code)



internalGetSetChildProperty
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child)(Code)



internalStructuralPropertiesForType
final List internalStructuralPropertiesForType(int apiLevel)(Code)



lastTrailingCommentIndex
public int lastTrailingCommentIndex(ASTNode node)(Code)
Return the index in the whole comments list CompilationUnit.getCommentList() of the last trailing comments associated with the given node.
Parameters:
  node - the node 0-based index of last trailing comment or -1 if node has noassociated comment after its end position.
since:
   3.2



lineNumber
public int lineNumber(int position)(Code)
Returns the line number corresponding to the given source character position in the original source string. The initial line of the compilation unit is numbered 1, and each line extends through the last character of the end-of-line delimiter. The very last line extends through the end of the source string and has no line delimiter. For example, the source string class A\n{\n} has 3 lines corresponding to inclusive character ranges [0,7], [8,9], and [10,10]. Returns 1 for a character position that does not correspond to any source line, or if no line number information is available for this compilation unit.
Parameters:
  position - a 0-based character position, possiblynegative or out of range the 1-based line number, or 1 if the characterposition does not correspond to a source line in the originalsource file or if line number information is not known for thiscompilation unit
See Also:   ASTParser
See Also:   CompilationUnit.getLineNumber(int)
See Also:   



memSize
int memSize()(Code)



propertyDescriptors
public static List propertyDescriptors(int apiLevel)(Code)
Returns a list of structural property descriptors for this node type. Clients must not modify the result.
Parameters:
  apiLevel - the API level; one of theAST.JLS* constants a list of property descriptors (element type: StructuralPropertyDescriptor)
since:
   3.0



recordModifications
public void recordModifications()(Code)
Enables the recording of changes to this compilation unit and its descendents. The compilation unit must have been created by ASTParser and still be in its original state. Once recording is on, arbitrary changes to the subtree rooted at this compilation unit are recorded internally. Once the modification has been completed, call rewrite to get an object representing the corresponding edits to the original source code string.
exception:
  IllegalArgumentException - if this compilation unit ismarked as unmodifiable, or if this compilation unit has already been tampered with, or recording has already been enabled
since:
   3.0



rewrite
public TextEdit rewrite(IDocument document, Map options)(Code)
Converts all modifications recorded for this compilation unit into an object representing the corresponding text edits to the given document containing the original source code for this compilation unit.

The compilation unit must have been created by ASTParser from the source code string in the given document, and recording must have been turned on with a prior call to recordModifications while the AST was still in its original state.

Calling this methods does not discard the modifications on record. Subsequence modifications made to the AST are added to the ones already on record. If this method is called again later, the resulting text edit object will accurately reflect the net cumulative affect of all those changes.


Parameters:
  document - original document containing source codefor this compilation unit
Parameters:
  options - the table of formatter options(key type: String; value type: String);or null to use the standard global optionsorg.eclipse.jdt.core.JavaCore.getOptions JavaCore.getOptions(). text edit object describing the changes to thedocument corresponding to the recorded AST modifications
exception:
  IllegalArgumentException - if the document passed isnull or does not correspond to this AST
exception:
  IllegalStateException - if recordModificationswas not called to enable recording
See Also:   CompilationUnit.recordModifications()
since:
   3.0



setCommentTable
void setCommentTable(Comment[] commentTable)(Code)
Sets the list of the comments encountered while parsing this compilation unit.
Parameters:
  commentTable - a list of comments in increasing orderof source start position, or null if commentinformation for this compilation unit is not available
exception:
  IllegalArgumentException - if the comment table isnot in increasing order of source position
See Also:   CompilationUnit.getCommentList()
See Also:   ASTParser
since:
   3.0



setLineEndTable
void setLineEndTable(int[] lineEndTable)(Code)
Sets the line end table for this compilation unit. If lineEndTable[i] == p then line number i+1 ends at character position p. Except for the last line, the positions are that of (the last character of) the line delimiter. For example, the source string A\nB\nC has line end table {1, 3, 4}.
Parameters:
  lineEndTable - the line end table



setPackage
public void setPackage(PackageDeclaration pkgDecl)(Code)
Sets or clears the package declaration of this compilation unit node to the given package declaration node.
Parameters:
  pkgDecl - the new package declaration node, or null if this compilation unit does not have a packagedeclaration (that is in the default package)
exception:
  IllegalArgumentException - if:
  • the node belongs to a different AST
  • the node already has a parent



setProblems
void setProblems(IProblem[] problems)(Code)
Sets the array of problems reported by the compiler during the parsing or name resolution of this compilation unit.
Parameters:
  problems - the list of problems



setTypeRoot
void setTypeRoot(ITypeRoot typeRoot)(Code)
Sets the Java type root (a org.eclipse.jdt.core.ICompilationUnit compilation unit or a org.eclipse.jdt.core.IClassFile class file ) this compilation unit was created from, or null if it was not created from a Java type root.
Parameters:
  typeRoot - the Java type root this compilation unit was created from



subtreeMatch0
final boolean subtreeMatch0(ASTMatcher matcher, Object other)(Code)



treeSize
int treeSize()(Code)



types
public List types()(Code)
Returns the live list of nodes for the top-level type declarations of this compilation unit, in order of appearance.

Note that in JLS3, the types may include both enum declarations and annotation type declarations introduced in J2SE 5. For JLS2, the elements are always TypeDeclaration.

the live list of top-level type declarationnodes (elementType: AbstractTypeDeclaration)



Fields inherited from org.eclipse.jdt.core.dom.ASTNode
final public static int ANNOTATION_TYPE_DECLARATION(Code)(Java Doc)
final public static int ANNOTATION_TYPE_MEMBER_DECLARATION(Code)(Java Doc)
final public static int ANONYMOUS_CLASS_DECLARATION(Code)(Java Doc)
final public static int ARRAY_ACCESS(Code)(Java Doc)
final public static int ARRAY_CREATION(Code)(Java Doc)
final public static int ARRAY_INITIALIZER(Code)(Java Doc)
final public static int ARRAY_TYPE(Code)(Java Doc)
final public static int ASSERT_STATEMENT(Code)(Java Doc)
final public static int ASSIGNMENT(Code)(Java Doc)
final static int BASE_NODE_SIZE(Code)(Java Doc)
final public static int BLOCK(Code)(Java Doc)
final public static int BLOCK_COMMENT(Code)(Java Doc)
final public static int BOOLEAN_LITERAL(Code)(Java Doc)
final public static int BREAK_STATEMENT(Code)(Java Doc)
final public static int CAST_EXPRESSION(Code)(Java Doc)
final public static int CATCH_CLAUSE(Code)(Java Doc)
final public static int CHARACTER_LITERAL(Code)(Java Doc)
final public static int CLASS_INSTANCE_CREATION(Code)(Java Doc)
final public static int COMPILATION_UNIT(Code)(Java Doc)
final public static int CONDITIONAL_EXPRESSION(Code)(Java Doc)
final public static int CONSTRUCTOR_INVOCATION(Code)(Java Doc)
final public static int CONTINUE_STATEMENT(Code)(Java Doc)
final static boolean CYCLE_RISK(Code)(Java Doc)
final public static int DO_STATEMENT(Code)(Java Doc)
final public static int EMPTY_STATEMENT(Code)(Java Doc)
final public static int ENHANCED_FOR_STATEMENT(Code)(Java Doc)
final public static int ENUM_CONSTANT_DECLARATION(Code)(Java Doc)
final public static int ENUM_DECLARATION(Code)(Java Doc)
final public static int EXPRESSION_STATEMENT(Code)(Java Doc)
final public static int FIELD_ACCESS(Code)(Java Doc)
final public static int FIELD_DECLARATION(Code)(Java Doc)
final public static int FOR_STATEMENT(Code)(Java Doc)
final static int HEADERS(Code)(Java Doc)
final public static int IF_STATEMENT(Code)(Java Doc)
final public static int IMPORT_DECLARATION(Code)(Java Doc)
final public static int INFIX_EXPRESSION(Code)(Java Doc)
final public static int INITIALIZER(Code)(Java Doc)
final public static int INSTANCEOF_EXPRESSION(Code)(Java Doc)
final public static int JAVADOC(Code)(Java Doc)
final public static int LABELED_STATEMENT(Code)(Java Doc)
final public static int LINE_COMMENT(Code)(Java Doc)
final public static int MALFORMED(Code)(Java Doc)
final static boolean MANDATORY(Code)(Java Doc)
final public static int MARKER_ANNOTATION(Code)(Java Doc)
final public static int MEMBER_REF(Code)(Java Doc)
final public static int MEMBER_VALUE_PAIR(Code)(Java Doc)
final public static int METHOD_DECLARATION(Code)(Java Doc)
final public static int METHOD_INVOCATION(Code)(Java Doc)
final public static int METHOD_REF(Code)(Java Doc)
final public static int METHOD_REF_PARAMETER(Code)(Java Doc)
final public static int MODIFIER(Code)(Java Doc)
final public static int NORMAL_ANNOTATION(Code)(Java Doc)
final static boolean NO_CYCLE_RISK(Code)(Java Doc)
final public static int NULL_LITERAL(Code)(Java Doc)
final public static int NUMBER_LITERAL(Code)(Java Doc)
final static boolean OPTIONAL(Code)(Java Doc)
final public static int ORIGINAL(Code)(Java Doc)
final public static int PACKAGE_DECLARATION(Code)(Java Doc)
final public static int PARAMETERIZED_TYPE(Code)(Java Doc)
final public static int PARENTHESIZED_EXPRESSION(Code)(Java Doc)
final public static int POSTFIX_EXPRESSION(Code)(Java Doc)
final public static int PREFIX_EXPRESSION(Code)(Java Doc)
final public static int PRIMITIVE_TYPE(Code)(Java Doc)
final public static int PROTECT(Code)(Java Doc)
final public static int QUALIFIED_NAME(Code)(Java Doc)
final public static int QUALIFIED_TYPE(Code)(Java Doc)
final public static int RECOVERED(Code)(Java Doc)
final public static int RETURN_STATEMENT(Code)(Java Doc)
final public static int SIMPLE_NAME(Code)(Java Doc)
final public static int SIMPLE_TYPE(Code)(Java Doc)
final public static int SINGLE_MEMBER_ANNOTATION(Code)(Java Doc)
final public static int SINGLE_VARIABLE_DECLARATION(Code)(Java Doc)
final public static int STRING_LITERAL(Code)(Java Doc)
final public static int SUPER_CONSTRUCTOR_INVOCATION(Code)(Java Doc)
final public static int SUPER_FIELD_ACCESS(Code)(Java Doc)
final public static int SUPER_METHOD_INVOCATION(Code)(Java Doc)
final public static int SWITCH_CASE(Code)(Java Doc)
final public static int SWITCH_STATEMENT(Code)(Java Doc)
final public static int SYNCHRONIZED_STATEMENT(Code)(Java Doc)
final public static int TAG_ELEMENT(Code)(Java Doc)
final public static int TEXT_ELEMENT(Code)(Java Doc)
final public static int THIS_EXPRESSION(Code)(Java Doc)
final public static int THROW_STATEMENT(Code)(Java Doc)
final public static int TRY_STATEMENT(Code)(Java Doc)
final public static int TYPE_DECLARATION(Code)(Java Doc)
final public static int TYPE_DECLARATION_STATEMENT(Code)(Java Doc)
final public static int TYPE_LITERAL(Code)(Java Doc)
final public static int TYPE_PARAMETER(Code)(Java Doc)
final public static int VARIABLE_DECLARATION_EXPRESSION(Code)(Java Doc)
final public static int VARIABLE_DECLARATION_FRAGMENT(Code)(Java Doc)
final public static int VARIABLE_DECLARATION_STATEMENT(Code)(Java Doc)
final public static int WHILE_STATEMENT(Code)(Java Doc)
final public static int WILDCARD_TYPE(Code)(Java Doc)
final AST ast(Code)(Java Doc)
int typeAndFlags(Code)(Java Doc)

Methods inherited from org.eclipse.jdt.core.dom.ASTNode
final public void accept(ASTVisitor visitor)(Code)(Java Doc)
abstract void accept0(ASTVisitor visitor)(Code)(Java Doc)
final void acceptChild(ASTVisitor visitor, ASTNode child)(Code)(Java Doc)
final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children)(Code)(Java Doc)
static void addProperty(StructuralPropertyDescriptor property, List propertyList)(Code)(Java Doc)
void appendDebugString(StringBuffer buffer)(Code)(Java Doc)
final void appendPrintString(StringBuffer buffer)(Code)(Java Doc)
final void checkModifiable()(Code)(Java Doc)
static void checkNewChild(ASTNode node, ASTNode newChild, boolean cycleCheck, Class nodeType)(Code)(Java Doc)
final ASTNode clone(AST target)(Code)(Java Doc)
abstract ASTNode clone0(AST target)(Code)(Java Doc)
public static ASTNode copySubtree(AST target, ASTNode node)(Code)(Java Doc)
public static List copySubtrees(AST target, List nodes)(Code)(Java Doc)
static void createPropertyList(Class nodeClass, List propertyList)(Code)(Java Doc)
final public void delete()(Code)(Java Doc)
final public boolean equals(Object obj)(Code)(Java Doc)
final public AST getAST()(Code)(Java Doc)
final public int getFlags()(Code)(Java Doc)
final public int getLength()(Code)(Java Doc)
final public StructuralPropertyDescriptor getLocationInParent()(Code)(Java Doc)
final public int getNodeType()(Code)(Java Doc)
abstract int getNodeType0()(Code)(Java Doc)
final public ASTNode getParent()(Code)(Java Doc)
final public Object getProperty(String propertyName)(Code)(Java Doc)
final public ASTNode getRoot()(Code)(Java Doc)
final public int getStartPosition()(Code)(Java Doc)
final public Object getStructuralProperty(StructuralPropertyDescriptor property)(Code)(Java Doc)
final public int hashCode()(Code)(Java Doc)
List internalGetChildListProperty(ChildListPropertyDescriptor property)(Code)(Java Doc)
boolean internalGetSetBooleanProperty(SimplePropertyDescriptor property, boolean get, boolean value)(Code)(Java Doc)
ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child)(Code)(Java Doc)
int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value)(Code)(Java Doc)
Object internalGetSetObjectProperty(SimplePropertyDescriptor property, boolean get, Object value)(Code)(Java Doc)
abstract List internalStructuralPropertiesForType(int apiLevel)(Code)(Java Doc)
abstract int memSize()(Code)(Java Doc)
public static Class nodeClassForType(int nodeType)(Code)(Java Doc)
final void postLazyInit(ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc)
final void postReplaceChild(ASTNode oldChild, ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc)
final void postValueChange(SimplePropertyDescriptor property)(Code)(Java Doc)
final void preLazyInit()(Code)(Java Doc)
final void preReplaceChild(ASTNode oldChild, ASTNode newChild, ChildPropertyDescriptor property)(Code)(Java Doc)
final void preValueChange(SimplePropertyDescriptor property)(Code)(Java Doc)
final public Map properties()(Code)(Java Doc)
static List reapPropertyList(List propertyList)(Code)(Java Doc)
final public void setFlags(int flags)(Code)(Java Doc)
final void setParent(ASTNode parent, StructuralPropertyDescriptor property)(Code)(Java Doc)
final public void setProperty(String propertyName, Object data)(Code)(Java Doc)
final public void setSourceRange(int startPosition, int length)(Code)(Java Doc)
final public void setStructuralProperty(StructuralPropertyDescriptor property, Object value)(Code)(Java Doc)
final String standardToString()(Code)(Java Doc)
static int stringSize(String string)(Code)(Java Doc)
final public List structuralPropertiesForType()(Code)(Java Doc)
final public int subtreeBytes()(Code)(Java Doc)
final public boolean subtreeMatch(ASTMatcher matcher, Object other)(Code)(Java Doc)
abstract boolean subtreeMatch0(ASTMatcher matcher, Object other)(Code)(Java Doc)
final void supportedOnlyIn2()(Code)(Java Doc)
final public String toString()(Code)(Java Doc)
abstract int treeSize()(Code)(Java Doc)
final void unsupportedIn2()(Code)(Java Doc)

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.