Java Doc for ITypeHierarchy.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.ITypeHierarchy

All known Subclasses:   org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy,
ITypeHierarchy
public interface ITypeHierarchy (Code)
A type hierarchy provides navigations between a type and its resolved supertypes and subtypes for a specific type or for all types within a region. Supertypes may extend outside of the type hierarchy's region in which it was created such that the root of the hierarchy is always included. For example, if a type hierarchy is created for a java.io.File, and the region the hierarchy was created in is the package fragment java.io, the supertype java.lang.Object will still be included.

A type hierarchy is static and can become stale. Although consistent when created, it does not automatically track changes in the model. As changes in the model potentially invalidate the hierarchy, change notifications are sent to registered ITypeHierarchyChangedListeners. Listeners should use the exists method to determine if the hierarchy has become completely invalid (for example, when the type or project the hierarchy was created on has been removed). To refresh a hierarchy, use the refresh method.

The type hierarchy may contain cycles due to malformed supertype declarations. Most type hierarchy queries are oblivious to cycles; the getAll* methods are implemented such that they are unaffected by cycles.

This interface is not intended to be implemented by clients.





Method Summary
 voidaddTypeHierarchyChangedListener(ITypeHierarchyChangedListener listener)
     Adds the given listener for changes to this type hierarchy.
 booleancontains(IType type)
     Returns whether the given type is part of this hierarchy.
 booleanexists()
     Returns whether the type and project this hierarchy was created on exist.
 IType[]getAllClasses()
     Returns all classes in this type hierarchy's graph, in no particular order.
 IType[]getAllInterfaces()
     Returns all interfaces in this type hierarchy's graph, in no particular order.
 IType[]getAllSubtypes(IType type)
     Returns all resolved subtypes (direct and indirect) of the given type, in no particular order, limited to the types in this type hierarchy's graph.
 IType[]getAllSuperInterfaces(IType type)
     Returns all resolved superinterfaces (direct and indirect) of the given type.
 IType[]getAllSuperclasses(IType type)
     Returns all resolved superclasses of the given class, in bottom-up order.
 IType[]getAllSupertypes(IType type)
     Returns all resolved supertypes of the given type, in bottom-up order.
 IType[]getAllTypes()
     Returns all types in this type hierarchy's graph, in no particular order.
 intgetCachedFlags(IType type)
     Return the flags associated with the given type (would be equivalent to IMember.getFlags()), or -1 if this information wasn't cached on the hierarchy during its computation.
 IType[]getExtendingInterfaces(IType type)
     Returns all interfaces resolved to extend the given interface, in no particular order, limited to the interfaces in this hierarchy's graph.
 IType[]getImplementingClasses(IType type)
     Returns all classes resolved to implement the given interface, in no particular order, limited to the classes in this type hierarchy's graph.
 IType[]getRootClasses()
     Returns all classes in the graph which have no resolved superclass, in no particular order.
 IType[]getRootInterfaces()
     Returns all interfaces in the graph which have no resolved superinterfaces, in no particular order.
 IType[]getSubclasses(IType type)
     Returns the direct resolved subclasses of the given class, in no particular order, limited to the classes in this type hierarchy's graph.
 IType[]getSubtypes(IType type)
     Returns the direct resolved subtypes of the given type, in no particular order, limited to the types in this type hierarchy's graph.
 IType[]getSuperInterfaces(IType type)
     Returns the direct resolved interfaces that the given type implements or extends, in no particular order, limited to the interfaces in this type hierarchy's graph.
 ITypegetSuperclass(IType type)
     Returns the resolved superclass of the given class, or null if the given class has no superclass, the superclass could not be resolved, or if the given type is an interface.
 IType[]getSupertypes(IType type)
     Returns the resolved supertypes of the given type, in no particular order, limited to the types in this type hierarchy's graph. For classes, this returns its superclass and the interfaces that the class implements. For interfaces, this returns the interfaces that the interface extends.
 ITypegetType()
     Returns the type this hierarchy was computed for.
 voidrefresh(IProgressMonitor monitor)
     Re-computes the type hierarchy reporting progress.
 voidremoveTypeHierarchyChangedListener(ITypeHierarchyChangedListener listener)
     Removes the given listener from this type hierarchy.
 voidstore(OutputStream outputStream, IProgressMonitor monitor)
     Stores the type hierarchy in an output stream.



Method Detail
addTypeHierarchyChangedListener
void addTypeHierarchyChangedListener(ITypeHierarchyChangedListener listener)(Code)
Adds the given listener for changes to this type hierarchy. Listeners are notified when this type hierarchy changes and needs to be refreshed. Has no effect if an identical listener is already registered.
Parameters:
  listener - the listener



contains
boolean contains(IType type)(Code)
Returns whether the given type is part of this hierarchy.
Parameters:
  type - the given type true if the given type is part of this hierarchy, false otherwise



exists
boolean exists()(Code)
Returns whether the type and project this hierarchy was created on exist. true if the type and project this hierarchy was created on exist, false otherwise



getAllClasses
IType[] getAllClasses()(Code)
Returns all classes in this type hierarchy's graph, in no particular order. Any classes in the creation region which were not resolved to have any subtypes or supertypes are not included in the result. all classes in this type hierarchy's graph



getAllInterfaces
IType[] getAllInterfaces()(Code)
Returns all interfaces in this type hierarchy's graph, in no particular order. Any interfaces in the creation region which were not resolved to have any subtypes or supertypes are not included in the result. all interfaces in this type hierarchy's graph



getAllSubtypes
IType[] getAllSubtypes(IType type)(Code)
Returns all resolved subtypes (direct and indirect) of the given type, in no particular order, limited to the types in this type hierarchy's graph. An empty array is returned if there are no resolved subtypes for the given type.
Parameters:
  type - the given type all resolved subtypes (direct and indirect) of the given type



getAllSuperInterfaces
IType[] getAllSuperInterfaces(IType type)(Code)
Returns all resolved superinterfaces (direct and indirect) of the given type. If the given type is a class, this includes all superinterfaces of all superclasses. An empty array is returned if there are no resolved superinterfaces for the given type.

NOTE: once a type hierarchy has been created, it is more efficient to query the hierarchy for superinterfaces than to query a type recursively. Querying an element performs a dynamic resolution, whereas the hierarchy returns a pre-computed result.
Parameters:
  type - the given type all resolved superinterfaces (direct and indirect) of the given type, an empty array if none




getAllSuperclasses
IType[] getAllSuperclasses(IType type)(Code)
Returns all resolved superclasses of the given class, in bottom-up order. An empty array is returned if there are no resolved superclasses for the given class.

NOTE: once a type hierarchy has been created, it is more efficient to query the hierarchy for superclasses than to query a class recursively up the superclass chain. Querying an element performs a dynamic resolution, whereas the hierarchy returns a pre-computed result.
Parameters:
  type - the given type all resolved superclasses of the given class, in bottom-up order, an emptyarray if none.




getAllSupertypes
IType[] getAllSupertypes(IType type)(Code)
Returns all resolved supertypes of the given type, in bottom-up order. An empty array is returned if there are no resolved supertypes for the given type.

Note that java.lang.Object is NOT considered to be a supertype of any interface type.

NOTE: once a type hierarchy has been created, it is more efficient to query the hierarchy for supertypes than to query a type recursively up the supertype chain. Querying an element performs a dynamic resolution, whereas the hierarchy returns a pre-computed result.
Parameters:
  type - the given type all resolved supertypes of the given class, in bottom-up order, an empty arrayif none




getAllTypes
IType[] getAllTypes()(Code)
Returns all types in this type hierarchy's graph, in no particular order. Any types in the creation region which were not resolved to have any subtypes or supertypes are not included in the result. all types in this type hierarchy's grap



getCachedFlags
int getCachedFlags(IType type)(Code)
Return the flags associated with the given type (would be equivalent to IMember.getFlags()), or -1 if this information wasn't cached on the hierarchy during its computation.
Parameters:
  type - the given type the modifier flags for this member
See Also:   Flags
since:
   2.0



getExtendingInterfaces
IType[] getExtendingInterfaces(IType type)(Code)
Returns all interfaces resolved to extend the given interface, in no particular order, limited to the interfaces in this hierarchy's graph. Returns an empty collection if the given type is a class, or if no interfaces were resolved to extend the given interface.
Parameters:
  type - the given type all interfaces resolved to extend the given interface limited to the interfaces in thishierarchy's graph, an empty array if none.



getImplementingClasses
IType[] getImplementingClasses(IType type)(Code)
Returns all classes resolved to implement the given interface, in no particular order, limited to the classes in this type hierarchy's graph. Returns an empty collection if the given type is a class, or if no classes were resolved to implement the given interface.
Parameters:
  type - the given type all classes resolved to implement the given interface limited to the classes in this typehierarchy's graph, an empty array if none



getRootClasses
IType[] getRootClasses()(Code)
Returns all classes in the graph which have no resolved superclass, in no particular order. all classes in the graph which have no resolved superclass



getRootInterfaces
IType[] getRootInterfaces()(Code)
Returns all interfaces in the graph which have no resolved superinterfaces, in no particular order. all interfaces in the graph which have no resolved superinterfaces



getSubclasses
IType[] getSubclasses(IType type)(Code)
Returns the direct resolved subclasses of the given class, in no particular order, limited to the classes in this type hierarchy's graph. Returns an empty collection if the given type is an interface, or if no classes were resolved to be subclasses of the given class.
Parameters:
  type - the given type the direct resolved subclasses of the given class limited to the classes in thistype hierarchy's graph, an empty collection if none.



getSubtypes
IType[] getSubtypes(IType type)(Code)
Returns the direct resolved subtypes of the given type, in no particular order, limited to the types in this type hierarchy's graph. If the type is a class, this returns the resolved subclasses. If the type is an interface, this returns both the classes which implement the interface and the interfaces which extend it.
Parameters:
  type - the given type the direct resolved subtypes of the given type limited to the types in thistype hierarchy's graph



getSuperInterfaces
IType[] getSuperInterfaces(IType type)(Code)
Returns the direct resolved interfaces that the given type implements or extends, in no particular order, limited to the interfaces in this type hierarchy's graph. For classes, this gives the interfaces that the class implements. For interfaces, this gives the interfaces that the interface extends.
Parameters:
  type - the given type the direct resolved interfaces that the given type implements or extends limited to the interfaces in this typehierarchy's graph



getSuperclass
IType getSuperclass(IType type)(Code)
Returns the resolved superclass of the given class, or null if the given class has no superclass, the superclass could not be resolved, or if the given type is an interface.
Parameters:
  type - the given type the resolved superclass of the given class, or null if the given class has no superclass,the superclass could not be resolved, or if the giventype is an interface



getSupertypes
IType[] getSupertypes(IType type)(Code)
Returns the resolved supertypes of the given type, in no particular order, limited to the types in this type hierarchy's graph. For classes, this returns its superclass and the interfaces that the class implements. For interfaces, this returns the interfaces that the interface extends. As a consequence java.lang.Object is NOT considered to be a supertype of any interface type.
Parameters:
  type - the given type the resolved supertypes of the given type limited to the types in thistype hierarchy's graph



getType
IType getType()(Code)
Returns the type this hierarchy was computed for. Returns null if this hierarchy was computed for a region. the type this hierarchy was computed for



refresh
void refresh(IProgressMonitor monitor) throws JavaModelException(Code)
Re-computes the type hierarchy reporting progress.
Parameters:
  monitor - the given progress monitor
exception:
  JavaModelException - if unable to refresh the hierarchy



removeTypeHierarchyChangedListener
void removeTypeHierarchyChangedListener(ITypeHierarchyChangedListener listener)(Code)
Removes the given listener from this type hierarchy. Has no affect if an identical listener is not registered.
Parameters:
  listener - the listener



store
void store(OutputStream outputStream, IProgressMonitor monitor) throws JavaModelException(Code)
Stores the type hierarchy in an output stream. This stored hierarchy can be load by IType#loadTypeHierachy(IJavaProject, InputStream, IProgressMonitor). Listeners of this hierarchy are not stored. Only hierarchies created by the following methods can be store:
  • IType#newSupertypeHierarchy(IProgressMonitor)
  • IType#newTypeHierarchy(IJavaProject, IProgressMonitor)
  • IType#newTypeHierarchy(IProgressMonitor)

Parameters:
  outputStream - output stream where the hierarchy will be stored
Parameters:
  monitor - the given progress monitor
exception:
  JavaModelException - if unable to store the hierarchy in the ouput stream
See Also:   IType.loadTypeHierachy(java.io.InputStreamIProgressMonitor)
since:
   2.1



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