[forge-dev] Possible to lookup classes in project being forged?
Richard Kennard
richard at kennardconsulting.com
Thu Oct 27 18:19:17 EDT 2011
Lincoln,
Yeah, I think that's pretty much it, thanks!
How do I get from there to an actual org.jboss.forge.parser.java.JavaClass?
Richard.
On 28/10/2011 9:12 AM, Lincoln Baxter, III wrote:
> Hey Richard,
>
> You can use JavaSourceFacet.getJavaResource("foo.Bar").getJavaSource();
>
> Is that what you were looking for?
>
> ~Lincoln
>
> On Thu, Oct 27, 2011 at 6:26 AM, Richard Kennard <richard at kennardconsulting.com <mailto:richard at kennardconsulting.com>> wrote:
>
> Hi guys,
>
> I was hoping there was a way in Forge to lookup the classes in the project being 'forged'. For example, in regular Java I can do...
>
> Class.forName( "foo.Bar" );
>
> So I was hoping for a Forge equivalent like...
>
> org.jboss.forge.parser.java.JavaClass.forName( "foo.Bar" )
>
> ...that would return me an org.jboss.forge.parser.java.JavaClass representing Bar. Note that Bar is a class in the project being forged. It is not an
> actual Class in the VM.
>
> Regards,
>
> Richard.
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org <mailto:forge-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>
>
>
> --
> Lincoln Baxter, III
> http://ocpsoft.com
> http://scrumshark.com
> "Keep it Simple"
>
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
More information about the forge-dev
mailing list