Hey Richard,
Sorry in advance for the short answer.
There is currently no API to ask which methods belong to a property, but I
do see great value in this. It wouldn't be hard to provide. Care to file a
JIRA for it?
Thanks,
Lincoln
On Fri, Oct 28, 2011 at 12:26 AM, Richard Kennard <
richard(a)kennardconsulting.com> wrote:
Hi guys,
As I understand it, Forge has an understanding of your project that
transcends Java's own understanding. So for example if I say...
field string --named foo
...Forge knows I'm creating a property, and it creates getters and setters
for that property. But later if I do...
org.jboss.forge.parser.java.JavaClass.getMethods()
...then I get back just normal methods. I'll have to check their signature
for 'get' or 'set' to see if they're properties. Equally if I do...
org.jboss.forge.parser.java.JavaClass.getFields()
...I'm not really sure if these are properties (and if so, what their
getter/setter methods are), or whether they're just normal internal fields.
Is there a recommended way to 'get back out' the list of properties for a
class? Something that tells me a) the field; b) the getter; c) the setter?
Richard.
_______________________________________________
forge-dev mailing list
forge-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev
--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"