diff --git a/api.debugger.jpda/apichanges.xml b/api.debugger.jpda/apichanges.xml --- a/api.debugger.jpda/apichanges.xml +++ b/api.debugger.jpda/apichanges.xml @@ -895,6 +895,26 @@ + + + Add methods for retrieval of implemented and extended types. + + + + + + Methods that provide implemented and extended types were added to + JPDAClassType class. These are: +
    +
  • getSubClasses()
  • +
  • getAllInterfaces()
  • +
  • getDirectInterfaces()
  • +
  • isInstanceOf()
  • +
+
+ + +
diff --git a/api.debugger.jpda/manifest.mf b/api.debugger.jpda/manifest.mf --- a/api.debugger.jpda/manifest.mf +++ b/api.debugger.jpda/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.api.debugger.jpda/2 OpenIDE-Module-Localizing-Bundle: org/netbeans/api/debugger/jpda/Bundle.properties -OpenIDE-Module-Specification-Version: 3.1 +OpenIDE-Module-Specification-Version: 3.2 OpenIDE-Module-Package-Dependencies: com.sun.jdi[VirtualMachineManager] diff --git a/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/JPDAClassType.java b/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/JPDAClassType.java --- a/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/JPDAClassType.java +++ b/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/JPDAClassType.java @@ -89,8 +89,43 @@ */ Super getSuperClass(); - /*List getSubClasses();*/ - + /** + * Get the currently loaded subclasses, when this type represents a class, + * or loaded subinterfaces and implementors of this interface, if this type + * represents an interface. + * @return a list of direct classes and interfaces, that extend this type. + * Returns an empty array when there are no such types. + * @since 3.2 + */ + List getSubClasses(); + + /** + * Get all interfaces that are directly or indirectly implemented by this class, + * or extended by this interface. + * @return a list of all implemented or extended interfaces. + * Returns an empty array when there are no such interfaces. + * @since 3.2 + */ + List getAllInterfaces(); + + /** + * Get the interfaces that are directly implemented by this class, + * or directly extended by this interface. + * @return a list of all implemented or extended interfaces. + * Returns an empty array when there are no such interfaces. + * @since 3.2 + */ + List getDirectInterfaces(); + + /** + * Check if this type in an instance of a given class name. + * @param className the class name + * @return true when this type is an instance of the given class + * name, false otherwise. + * @since 3.2 + */ + boolean isInstanceOf(String className); + /** * Provide a list of static fields declared in this type. * @return the list of {@link org.netbeans.api.debugger.jpda.Field} objects