[英]Pharo Smalltalk - How can I list all the classes in a Category (aka Package or Tag)?
Pharo Smalltalk - How can I list all the classes in a Category? Pharo Smalltalk-如何列出类别中的所有类别?
In the System Browser, the first pane contains the Category under which all my classes are listed. 在系统浏览器中,第一个窗格包含“类别”,在该类别下列出了我所有的类。 Is there a list of those classes programmatically? 是否以编程方式列出了这些类别?
You can list all classes like 您可以列出所有类别,例如
(RPackageOrganizer default packageNamed: 'Kernel') definedClasses
You can also use 您也可以使用
(RPackageOrganizer default packageNamed: 'Kernel') classTags
to get all tags in the package (previously known as packages
) and for each you can send #classes
to get the classes of the tag 获取包中的所有标签(以前称为packages
),对于每个标签,您都可以发送#classes
来获取标签的类
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.