[forge-users] Checking if a class is final from JavaClassSource

George Gastaldi ggastald at redhat.com
Wed Feb 11 17:42:54 EST 2015


Oh, my apologies, I could swear that method existed. I'll open a JIRA and get this done asap.

Thanks



> Em 11/02/2015, às 20:33, Lincoln Baxter, III <lincolnbaxter at gmail.com> escreveu:
> 
> George,
> 
> That method does not appear to exist. It looks like we are missing a feature.
> 
> In the mean time, Ludo, you can call .toString() on the JavaClassSource object and check for the final modifier before the first instance of the type name:
> 
> if(source.toString().matches("^.*final(?<!" + source.getName() + ")"))
> 
> Something like that should work.
> 
> ~Lincoln
> 
>> On Wed, Feb 11, 2015 at 12:26 PM, George Gastaldi <ggastald at redhat.com> wrote:
>> Tried JavaClassSource.setFinal(false)?
>> 
>> 
>> 
>> > Em 11/02/2015, às 15:24, forge-users at lists.jboss.org escreveu:
>> >
>> > Hi,
>> >
>> > maybe a dummy question, but I didn't find the way to check is a class is final, using JavaClassSource object ?
>> >
>> > I need to check if, and remove final modifier if found.
>> >
>> > Thanx for your help
>> > Ludo
>> >
>> > Posted by forums
>> > Original post: https://developer.jboss.org/message/918504#918504
>> > _______________________________________________
>> > forge-users mailing list
>> > forge-users at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/forge-users
>> 
>> _______________________________________________
>> forge-users mailing list
>> forge-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
> 
> 
> 
> -- 
> Lincoln Baxter, III
> http://ocpsoft.org
> "Simpler is better."
> _______________________________________________
> forge-users mailing list
> forge-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-users/attachments/20150211/6f4e6a3b/attachment-0001.html 


More information about the forge-users mailing list