[forge-dev] Recommended way to retrieve properties from a JavaClass?

Lincoln Baxter, III lincolnbaxter at gmail.com
Fri Oct 28 11:27:52 EDT 2011

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?


On Fri, Oct 28, 2011 at 12:26 AM, Richard Kennard <
richard at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev

Lincoln Baxter, III
"Keep it Simple"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20111028/83e0012e/attachment.html 

More information about the forge-dev mailing list