On Fri, May 30, 2014 at 9:39 PM, Paul Benedict <[email protected]> wrote:

> I think you guys are better off doing separate annotations to do strong
> typing. You could use a stereotyping pattern like Bean Validation spec.
>
> public @interface PluginAttribute ...
>
> Then annotate other annotations with that:
> @PluginAttribute
> public @interface IntPluginAttribute
>

I did propose that earlier ;-) It seems much cleaner...

Gary


> See how the Been Validation spec works to copy their pattern.
> On May 30, 2014 7:55 PM, "Gary Gregory" <[email protected]> wrote:
>
>> Hm... you cannot use Enum in the return type for an annotation attribute,
>> only an actual enum, like RetentionPolicy. So it seems a no-go.
>>
>> Gary
>>
>>
>> On Fri, May 30, 2014 at 4:24 PM, Matt Sicker <[email protected]> wrote:
>>
>>> I had the same hold-up when thinking about adding that, too. How about
>>> RetentionPolicy.SOURCE? Or ElementType.TYPE? Something annotation-related
>>> like that.
>>>
>>>
>>> On 30 May 2014 13:12, Gary Gregory <[email protected]> wrote:
>>>
>>>> I added PluginAttribute#defaultClass() since we can have a Class has an
>>>> attribute value.
>>>>
>>>> One can also have an Enum as an attribute value, but what default
>>>> should be use?
>>>>
>>>> Gary
>>>>
>>>> --
>>>> E-Mail: [email protected] | [email protected]
>>>> Java Persistence with Hibernate, Second Edition
>>>> <http://www.manning.com/bauer3/>
>>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>>> Spring Batch in Action <http://www.manning.com/templier/>
>>>> Blog: http://garygregory.wordpress.com
>>>> Home: http://garygregory.com/
>>>> Tweet! http://twitter.com/GaryGregory
>>>>
>>>
>>>
>>>
>>> --
>>> Matt Sicker <[email protected]>
>>>
>>
>>
>>
>> --
>> E-Mail: [email protected] | [email protected]
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>


-- 
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to