[forge-users] Checking if a class is final from JavaClassSource
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.
> Em 11/02/2015, às 20:33, Lincoln Baxter, III <lincolnbaxter at gmail.com> escreveu:
> 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.
>> 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
> Lincoln Baxter, III
> "Simpler is better."
> forge-users mailing list
> forge-users at lists.jboss.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the forge-users