You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by David Blevins <da...@visi.com> on 2009/09/17 01:04:11 UTC

small change: isFooExist() -> hasFoo()

Hi All,

Wondering if there'd be any objections to me updating all the boolean  
returning methods that use isFooExist() to use something that works  
grammatically like hasFoo().

For example in AnnotationUtil:

  public static boolean isMethodParameterAnnotationExist(Method  
method, Class<? extends Annotation> clazz)

Would become:

  public static boolean hasMethodParameterAnnotation(Method method,  
Class<? extends Annotation> clazz)

And then usage of it would look like this:

   for (Method m : methods)
   {
       if (hasMethodParameterAnnotation(m, annotation))
       {
           list.add(m);
       }
   }

Which in english would read "if method 'm' has the method parameter  
annotation 'annotation' ...."

Thoughts?


-David


Re: small change: isFooExist() -> hasFoo()

Posted by Mohammad Nour El-Din <no...@gmail.com>.
+1 with Davin in case the condition of Struberg holds.

On Thu, Sep 17, 2009 at 9:02 AM, Mark Struberg <st...@yahoo.de> wrote:
> As long as we don't touch beans I'm fine with it since it is much more readable.
>
> Think only getX and isX is specified in the BeanSpec, isn't?
>
> LieGrue,
> strub
>
> --- On Thu, 9/17/09, Gurkan Erdogdu <gu...@yahoo.com> wrote:
>
>> From: Gurkan Erdogdu <gu...@yahoo.com>
>> Subject: Re: small change: isFooExist() -> hasFoo()
>> To: openwebbeans-dev@incubator.apache.org
>> Date: Thursday, September 17, 2009, 4:03 AM
>> Hi David;
>>
>> +1;
>>
>> That is more meaningful!
>>
>>
>> Thanks;
>>
>> --Gurkan
>>
>>
>> ________________________________
>> From: David Blevins <da...@visi.com>
>> To: openwebbeans-dev@incubator.apache.org
>> Sent: Thursday, September 17, 2009 2:04:11 AM
>> Subject: small change: isFooExist() -> hasFoo()
>>
>> Hi All,
>>
>> Wondering if there'd be any objections to me updating all
>> the boolean returning methods that use isFooExist() to use
>> something that works grammatically like hasFoo().
>>
>> For example in AnnotationUtil:
>>
>> public static boolean
>> isMethodParameterAnnotationExist(Method method, Class<?
>> extends Annotation> clazz)
>>
>> Would become:
>>
>> public static boolean hasMethodParameterAnnotation(Method
>> method, Class<? extends Annotation> clazz)
>>
>> And then usage of it would look like this:
>>
>>   for (Method m : methods)
>>   {
>>       if (hasMethodParameterAnnotation(m,
>> annotation))
>>       {
>>           list.add(m);
>>       }
>>   }
>>
>> Which in english would read "if method 'm' has the method
>> parameter annotation 'annotation' ...."
>>
>> Thoughts?
>>
>>
>> -David
>>
>>
>>
>
>
>
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

Re: small change: isFooExist() -> hasFoo()

Posted by Sven Linstaedt <sv...@googlemail.com>.
As far as I remenber, yes.

Sven

Am 17.09.2009 um 09:02 schrieb Mark Struberg <st...@yahoo.de>:

> As long as we don't touch beans I'm fine with it since it is much  
> more readable.
>
> Think only getX and isX is specified in the BeanSpec, isn't?
>
> LieGrue,
> strub
>
> --- On Thu, 9/17/09, Gurkan Erdogdu <gu...@yahoo.com> wrote:
>
>> From: Gurkan Erdogdu <gu...@yahoo.com>
>> Subject: Re: small change: isFooExist() -> hasFoo()
>> To: openwebbeans-dev@incubator.apache.org
>> Date: Thursday, September 17, 2009, 4:03 AM
>> Hi David;
>>
>> +1;
>>
>> That is more meaningful!
>>
>>
>> Thanks;
>>
>> --Gurkan
>>
>>
>> ________________________________
>> From: David Blevins <da...@visi.com>
>> To: openwebbeans-dev@incubator.apache.org
>> Sent: Thursday, September 17, 2009 2:04:11 AM
>> Subject: small change: isFooExist() -> hasFoo()
>>
>> Hi All,
>>
>> Wondering if there'd be any objections to me updating all
>> the boolean returning methods that use isFooExist() to use
>> something that works grammatically like hasFoo().
>>
>> For example in AnnotationUtil:
>>
>> public static boolean
>> isMethodParameterAnnotationExist(Method method, Class<?
>> extends Annotation> clazz)
>>
>> Would become:
>>
>> public static boolean hasMethodParameterAnnotation(Method
>> method, Class<? extends Annotation> clazz)
>>
>> And then usage of it would look like this:
>>
>>   for (Method m : methods)
>>   {
>>       if (hasMethodParameterAnnotation(m,
>> annotation))
>>       {
>>           list.add(m);
>>       }
>>   }
>>
>> Which in english would read "if method 'm' has the method
>> parameter annotation 'annotation' ...."
>>
>> Thoughts?
>>
>>
>> -David
>>
>>
>>
>
>
>

Re: small change: isFooExist() -> hasFoo()

Posted by Mark Struberg <st...@yahoo.de>.
As long as we don't touch beans I'm fine with it since it is much more readable. 

Think only getX and isX is specified in the BeanSpec, isn't?

LieGrue,
strub

--- On Thu, 9/17/09, Gurkan Erdogdu <gu...@yahoo.com> wrote:

> From: Gurkan Erdogdu <gu...@yahoo.com>
> Subject: Re: small change: isFooExist() -> hasFoo()
> To: openwebbeans-dev@incubator.apache.org
> Date: Thursday, September 17, 2009, 4:03 AM
> Hi David;
> 
> +1;
> 
> That is more meaningful!
> 
> 
> Thanks;
> 
> --Gurkan
> 
> 
> ________________________________
> From: David Blevins <da...@visi.com>
> To: openwebbeans-dev@incubator.apache.org
> Sent: Thursday, September 17, 2009 2:04:11 AM
> Subject: small change: isFooExist() -> hasFoo()
> 
> Hi All,
> 
> Wondering if there'd be any objections to me updating all
> the boolean returning methods that use isFooExist() to use
> something that works grammatically like hasFoo().
> 
> For example in AnnotationUtil:
> 
> public static boolean
> isMethodParameterAnnotationExist(Method method, Class<?
> extends Annotation> clazz)
> 
> Would become:
> 
> public static boolean hasMethodParameterAnnotation(Method
> method, Class<? extends Annotation> clazz)
> 
> And then usage of it would look like this:
> 
>   for (Method m : methods)
>   {
>       if (hasMethodParameterAnnotation(m,
> annotation))
>       {
>           list.add(m);
>       }
>   }
> 
> Which in english would read "if method 'm' has the method
> parameter annotation 'annotation' ...."
> 
> Thoughts?
> 
> 
> -David
> 
> 
>       


      

Re: small change: isFooExist() -> hasFoo()

Posted by Gurkan Erdogdu <gu...@yahoo.com>.
Hi David;

+1;

That is more meaningful!


Thanks;

--Gurkan


________________________________
From: David Blevins <da...@visi.com>
To: openwebbeans-dev@incubator.apache.org
Sent: Thursday, September 17, 2009 2:04:11 AM
Subject: small change: isFooExist() -> hasFoo()

Hi All,

Wondering if there'd be any objections to me updating all the boolean returning methods that use isFooExist() to use something that works grammatically like hasFoo().

For example in AnnotationUtil:

public static boolean isMethodParameterAnnotationExist(Method method, Class<? extends Annotation> clazz)

Would become:

public static boolean hasMethodParameterAnnotation(Method method, Class<? extends Annotation> clazz)

And then usage of it would look like this:

  for (Method m : methods)
  {
      if (hasMethodParameterAnnotation(m, annotation))
      {
          list.add(m);
      }
  }

Which in english would read "if method 'm' has the method parameter annotation 'annotation' ...."

Thoughts?


-David


      

Re: small change: isFooExist() -> hasFoo()

Posted by David Blevins <da...@visi.com>.
Ok, made that change.  Left all the beans alone.

-David

On Sep 16, 2009, at 4:04 PM, David Blevins wrote:

> Hi All,
>
> Wondering if there'd be any objections to me updating all the  
> boolean returning methods that use isFooExist() to use something  
> that works grammatically like hasFoo().
>
> For example in AnnotationUtil:
>
> public static boolean isMethodParameterAnnotationExist(Method  
> method, Class<? extends Annotation> clazz)
>
> Would become:
>
> public static boolean hasMethodParameterAnnotation(Method method,  
> Class<? extends Annotation> clazz)
>
> And then usage of it would look like this:
>
>  for (Method m : methods)
>  {
>      if (hasMethodParameterAnnotation(m, annotation))
>      {
>          list.add(m);
>      }
>  }
>
> Which in english would read "if method 'm' has the method parameter  
> annotation 'annotation' ...."
>
> Thoughts?
>
>
> -David
>
>