From: Moritz H. <ant...@gm...> - 2011-07-03 09:00:14
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Mark, maybe the enumeration class in the incubator helps for this purpose? Kind regards, Moritz On 07/03/2011 04:35 AM, Mark Miesfeld wrote: > Is there a way to extract all the ::constant method names and values > given a generic object? A fairly easy way? > > What I'd like to do is iterate over the methods of an object and > extract all the constants and their values. > > If I could get the source of just the class, parsing source for > ::constant would be fine. But I don't see a way to get the source > lines for just a class. Getting the methods of the class, doesn't > give the value of the constant. Plus I don't see any way to tell that > a method is a ::constant method to begin with. > > You can get the package source from the .context and parse that > looking for the class definition. Then parse the lines until you > finish the class. Then get the imported packages and parse them. If > the package is big, or the imported packages are big, this seems like > it could be relatively time consuming. > > -- > Mark Miesfeld > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREIAAYFAk4QL4UACgkQ264ap80Va8drCwD8Djvf3dDP6rVGyZwKI0z4u+kk tdewBbJQCRMVvi+4FP0A+wS38m5ME9LjkXnKGlke93SRSyP/EnfeaZo8oQYYz4jU =OyW6 -----END PGP SIGNATURE----- |