[Pharo-project] Roeltyper in Pharo

Frederic Pluquet fpluquet at ulb.ac.be
Fri Nov 12 14:32:44 CET 2010


Hello,

Thank for your interest in RoelTyper.

The user interface of RoelTyper is the class TypeCollector.

To know the types of an instance variable of a class use the method
"typeInstvar: var ofClass: aClass". For example:

*TypeCollector typeInstvar: #x ofClass: Point*

This returns an ExtractedType object that contains the collected information
for #x about its assignments, interface (messages sent on it) and links with
other variables.  To calculate types from this information, send the message
"types" on an ExtractedType object. For example:

*(TypeCollector typeInstvar: #x ofClass: Point) types*

returns an ordered collection with the class "Number".

You can also ask types of the temporary variables of methods. For example:

*TypeCollector typeTmpsIn: (Point >> #>) ofClass: Point*

returns an indentitydictionary with the extracted types for ^ (the type of
the return value) and aPoint (the parameter of the method).

Cheers,

Fréd
----
Frédéric Pluquet
Université Libre de Bruxelles (ULB)
Assistant
http://www.ulb.ac.be/di/fpluquet


On Thu, Nov 11, 2010 at 5:16 PM, Dave Mason <dvmason at gmail.com> wrote:

> Hi,
>
> I'm trying to figure out how to use the RoelTyper in Pharo.  When I go to
> the page: http://decomp.ulb.ac.be/roelwuyts/smalltalk/roeltyper/ it talks
> about the refactoring browser, but it's a Cincom browser.  I see that you're
> the most recent editor of RoelTyper on SqueakSource, so I assume you have
> some idea how to use it.
>
> Any assistance would be appreciated!
>
> Thanks  ../Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101112/86c12d5e/attachment.htm>


More information about the Pharo-project mailing list