Federer
Federer

Reputation: 34745

Seeing all classes that extent current viewed class in javadocs?

At the risk of sounding incredibly stupid and receiving a rather patronising answer, how do I view all other classes that extend the current 'viewed class' in javadocS?

i.e.

Object a {}

Object b extends a {}

Viewing a, is there a way to see 'all classes that have extended this class A'... therefore showing 'Class B'.

EDIT:

Thanks for that. There is an API I am reading at the minute where I was certain there had to be subclasses... turns out it doesn't! Interesting.

Upvotes: 3

Views: 1125

Answers (2)

Boris Pavlović
Boris Pavlović

Reputation: 64632

Outside of your IDE javadocs in browser have a header "Direct Known Subclasses:" like the one in the javadoc for ArrayList. In IntelliJ IDEA all implementations/extensions of currently viewed interface/class can be seen if you press + B.

Upvotes: 1

Andrzej Doyle
Andrzej Doyle

Reputation: 103797

Javadoc should automatically generate the "Direct known subclasses" section, which in this case would list class B.

You shouldn't need to do anything to make this show up, so if you're not, there's a possibility it's a bug in the javadoc generator (however, unless you've presented a simplified version here, I'd be surprised if this trivial case triggers it).

Upvotes: 4

Related Questions