Skip to content

Instantly share code, notes, and snippets.

@frankshearar
Created July 24, 2013 10:22
Show Gist options
  • Save frankshearar/6069452 to your computer and use it in GitHub Desktop.
Save frankshearar/6069452 to your computer and use it in GitHub Desktop.
On what classes does some particular class depend?
| classDeps |
classDeps := [:cls |
(cls methodDict values gather: [:cm |
(((1 to: cm numLiterals) collect: [:i | cm literalAt: i])
select: [:lit | lit isVariableBinding and: [lit value isBehavior]])
collect: #value]) asSet difference: {cls}].
classDeps value: TextComposer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment