QDox

JavaClass.getInnerClasses() misleadingly named

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.6
  • Fix Version/s: 1.6
  • Component/s: Java API
  • Labels:
    None
  • Environment:
    N/A
  • Number of attachments :
    0

Description

Re.

http://qdox.codehaus.org/apidocs/com/thoughtworks/qdox/model/JavaClass.html#getInnerClasses()

The method getInnerClasses() seems to actually be listing all nested classes, including static nested classes, not just inner classes. This is a common misuse of the term "inner class". For definitions see

http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html

and search for "nested" and "inner", specifically

"An inner class is a nested class that is not explicitly or implicitly declared static."

You might consider renaming the method to JavaClass.getNestedClasses() for this reason, unless you are really returning only inner classes.

Activity

Hide
Mike Williams added a comment -

Good point, thanks. We should rename it (and retain getInnerClasses as a deprecated synonym).

Show
Mike Williams added a comment - Good point, thanks. We should rename it (and retain getInnerClasses as a deprecated synonym).
Hide
Mike Williams added a comment -

Fixed for QDox-1.6. getInnerClasses() remains, but is deprecated.

Show
Mike Williams added a comment - Fixed for QDox-1.6. getInnerClasses() remains, but is deprecated.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
30m
Original Estimate - 30 minutes
Remaining:
30m
Remaining Estimate - 30 minutes
Logged:
Not Specified
Time Spent - Not Specified