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


org.eclipse.jdt.core.IClassFile

All known Subclasses:   org.eclipse.jdt.internal.core.ClassFile,
IClassFile
public interface IClassFile extends ITypeRoot(Code)
Represents an entire binary type (single .class file). A class file has a single child of type IType. Class file elements need to be opened before they can be navigated. If a class file cannot be parsed, its structure remains unknown. Use IJavaElement.isStructureKnown to determine whether this is the case.

Note: IClassFile extends ISourceReference. Source can be obtained for a class file if and only if source has been attached to this class file. The source associated with a class file is the source code of the compilation unit it was (nominally) generated from.

This interface is not intended to be implemented by clients.


See Also:   IPackageFragmentRoot.attachSource(org.eclipse.core.runtime.IPathorg.eclipse.core.runtime.IPathIProgressMonitor)




Method Summary
 ICompilationUnitbecomeWorkingCopy(IProblemRequestor problemRequestor, WorkingCopyOwner owner, IProgressMonitor monitor)
     Changes this class file handle into a working copy.
 byte[]getBytes()
     Returns the bytes contained in this class file.
 ITypegetType()
     Returns the type contained in this class file. This is a handle-only method.
 IJavaElementgetWorkingCopy(IProgressMonitor monitor, IBufferFactory factory)
     Returns a working copy on the source associated with this class file using the given factory to create the buffer, or null if there is no source associated with the class file.

The buffer will be automatically initialized with the source of the class file upon creation.

The only valid operations on this working copy are getBuffer() or getOriginalElement.
Parameters:
  monitor - a progress monitor used to report progress while opening this compilation unitor null if no progress should be reported
Parameters:
  factory - the factory that creates a buffer that is used to get the content of the working copyor null if the internal factory should be used a a working copy on the source associated with this class file
exception:
  JavaModelException - if the source of this class file cannot be determined.

 booleanisClass()
     Returns whether this type represents a class.
 booleanisInterface()
     Returns whether this type represents an interface.



Method Detail
becomeWorkingCopy
ICompilationUnit becomeWorkingCopy(IProblemRequestor problemRequestor, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException(Code)
Changes this class file handle into a working copy. A new IBuffer is created using the given owner. Uses the primary owner if null is specified.

When switching to working copy mode, problems are reported to the given IProblemRequestor . Note that once in working copy mode, the given IProblemRequestor is ignored. Only the original IProblemRequestor is used to report subsequent problems.

Once in working copy mode, changes to this working copy or its children are done in memory. Only the new buffer is affected.

Using ICompilationUnit.commitWorkingCopy(booleanIProgressMonitor) on the working copy will throw a JavaModelException as a class file is implicetly read-only.

If this class file was already in working copy mode, an internal counter is incremented and no other action is taken on this working copy. To bring this working copy back into the original mode (where it reflects the underlying resource), ICompilationUnit.discardWorkingCopy must be call as many times as IClassFile.becomeWorkingCopy(IProblemRequestor,WorkingCopyOwner,IProgressMonitor) .

The primary compilation unit of a class file's working copy does not exist if the class file is not in working copy mode (classFileWorkingCopy.getPrimary().exists() == false).

The resource of a class file's working copy is null if the class file is in an external jar file.


Parameters:
  problemRequestor - a requestor which will get notified of problems detected duringreconciling as they are discovered. The requestor can be set to null indicatingthat the client is not interested in problems.
Parameters:
  owner - the given WorkingCopyOwner, or null for the primary owner
Parameters:
  monitor - a progress monitor used to report progress while opening this compilation unitor null if no progress should be reported a working copy for this class file
throws:
  JavaModelException - if this compilation unit could not become a working copy.
See Also:   ICompilationUnit.discardWorkingCopy
since:
   3.2ITypeRoot.getWorkingCopy(WorkingCopyOwnerIProgressMonitor)



getBytes
byte[] getBytes() throws JavaModelException(Code)
Returns the bytes contained in this class file. the bytes contained in this class file
exception:
  JavaModelException - if this element does not exist or if anexception occurs while accessing its corresponding resource
since:
   3.3



getType
IType getType()(Code)
Returns the type contained in this class file. This is a handle-only method. The type may or may not exist. the type contained in this class file



getWorkingCopy
IJavaElement getWorkingCopy(IProgressMonitor monitor, IBufferFactory factory) throws JavaModelException(Code)
Returns a working copy on the source associated with this class file using the given factory to create the buffer, or null if there is no source associated with the class file.

The buffer will be automatically initialized with the source of the class file upon creation.

The only valid operations on this working copy are getBuffer() or getOriginalElement.
Parameters:
  monitor - a progress monitor used to report progress while opening this compilation unitor null if no progress should be reported
Parameters:
  factory - the factory that creates a buffer that is used to get the content of the working copyor null if the internal factory should be used a a working copy on the source associated with this class file
exception:
  JavaModelException - if the source of this class file cannot be determined. Reasons include:

  • This class file does not exist (ELEMENT_DOES_NOT_EXIST)

since:
   2.0ITypeRoot.getWorkingCopy(WorkingCopyOwnerIProgressMonitor)



isClass
boolean isClass() throws JavaModelException(Code)
Returns whether this type represents a class. This is not guaranteed to be instantaneous, as it may require parsing the underlying file. true if the class file represents a class.
exception:
  JavaModelException - if this element does not exist or if anexception occurs while accessing its corresponding resource



isInterface
boolean isInterface() throws JavaModelException(Code)
Returns whether this type represents an interface. This is not guaranteed to be instantaneous, as it may require parsing the underlying file. true if the class file represents an interface.
exception:
  JavaModelException - if this element does not exist or if anexception occurs while accessing its corresponding resource



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.