Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure: list what _implements_ a class #87

Closed
sethladd opened this issue Jan 12, 2015 · 7 comments
Closed

Ensure: list what _implements_ a class #87

sethladd opened this issue Jan 12, 2015 · 7 comments

Comments

@sethladd
Copy link
Contributor

Was https://code.google.com/p/dart/issues/detail?id=16439

'implements' is as common as 'extends'

@keertip
Copy link
Collaborator

keertip commented May 5, 2015

dartdoc shows implements, extends and mixins.

screen shot 2015-05-05 at 2 53 01 pm

@keertip keertip closed this as completed May 5, 2015
@bseib
Copy link

bseib commented May 6, 2015

counter example:

What (known) classes extend the abstract class Type in core?

image

@sethladd
Copy link
Contributor Author

sethladd commented May 6, 2015

I'm not a total expert of this part of the spec, but classes aren't first class. The runtimeType of an instance is of type Type. A class doesn't subclass from Type.

@bseib
Copy link

bseib commented May 6, 2015

Do I understand the original issue correctly? That the generated Dart docs didn't show what known classes implement the class you're reading about?

For example, the abstract class HashMap:

image

In the docs I can easily see that it implements Map, but I don't know what classes implement it. (And perhaps that's not what this github issue was about.)

If I grep the sdk sources, I discover that LinkedHashMap implements HashMap.

zbox:/home/hub/bseib/git/bleeding_edge/dart/sdk/lib (master u=)$ grep -r "implements HashMap" ./*
./_internal/compiler/js_lib/collection_patch.dart:class _HashMap<K, V> implements HashMap<K, V> {
./collection/linked_hash_map.dart:abstract class LinkedHashMap<K, V> implements HashMap<K, V> {

It would be useful to see all known implementing classes in the docs. It helps one navigate and understand the relationships of the libraries at our disposal.

@sethladd
Copy link
Contributor Author

sethladd commented May 6, 2015

Ah... it sounds like you're asking for "implemented by". Yes, that is useful. Looks like we have this:

screen shot 2015-05-05 at 8 24 00 pm

@bseib
Copy link

bseib commented May 6, 2015

Yes, where it says "Implementors" -- I'm looking for that. What's the URL for your example page? Or is this the output of a newer dartdocgen?

@sethladd
Copy link
Contributor Author

sethladd commented May 6, 2015

Yes, it's the new output from the dartdoc tool (which is the tool from this repo :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants