deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: [DISCUSS] [DELTASPIKE-54] AnnotationInstanceProvider
Date Thu, 19 Jan 2012 14:58:46 GMT
On Thu, Jan 19, 2012 at 6:37 AM, Arne Limburg
<arne.limburg@openknowledge.de> wrote:
> +0.5 from me, too.
>
> At least we need a method to create a memberless annotation as Pete suggests. In addition
there should be a simple way to create an annotation that has just a value() attribute.
> Additionally I am thinking about a more typesafe approach, but I am afraid we can't find
one.
>

Hmm... can't find one?  My link was to the test cases demonstrating
the typesafe annotation stubbing available in Commons [proxy]'s 2.0
branch:

http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/stub/src/test/java/org/apache/commons/proxy2/stub/AnnotationFactoryTest.java?view=markup

Matt

> So imho at least we need
> provider.get(SimpleAnnotation.class)
> and maybe
> provider.get(AnnotationWithOneAttribute.class, attributeValue)
>
> And the get(...) has to check the types of the values to get a fail-fast-behavior.
>
> regards,
> Arne
>
> -----Urspr√ľngliche Nachricht-----
> Von: Pete Muir [mailto:pmuir@redhat.com]
> Gesendet: Donnerstag, 19. Januar 2012 13:17
> An: deltaspike-dev@incubator.apache.org
> Betreff: Re: [DISCUSS] [DELTASPIKE-54] AnnotationInstanceProvider
>
> +0.5 from me as well.
>
> I would want to see AnnotationInstanceProvider enhanced to have the ability to create
a memberless annotation instance without having to provide an empty map as an argument.
>
> I would like to spend some time considering a type safe approach such as Matt's *in addition
to* the map of values, which as Gerhard mentions we will need for XML config.
>
> On 18 Jan 2012, at 23:04, Gerhard Petracek wrote:
>
>> as mentioned by pete (earlier), the additional features (DELTASPIKE-54
>> vs
>> DELTASPIKE-55) aren't type-safe.
>> -> +0.5 afaik we will need it for further features which need such a
>> generic approach (no +1 because we haven't discussed them so far)
>>
>> regards,
>> gerhard
>>
>>
>>
>> 2012/1/18 Jason Porter <lightguard.jp@gmail.com>
>>
>>> This should be DELTASPIKE-55
>>>
>>> On Wed, Jan 18, 2012 at 14:26, Jason Porter <lightguard.jp@gmail.com>
>>> wrote:
>>>
>>>> fyi: please check [1] before you answer.
>>>>
>>>> [2] is the implementation used in Solder. It also contains the
>>>> functionality of CODI's SimpleLiteral.
>>>>
>>>> the basic concept:
>>>> Provide a way to create an instance of an annotation at runtime
>>>> using Proxy. This implementation is also able to provide values for
>>>> the annotation parameters.
>>>>
>>>> please send
>>>> +1, +0 or -1 because...
>>>> for the basic idea as well as the basic concept.
>>>>
>>>>
>>>> [1] http://markmail.org/message/7yefspfuvtz4jvmp
>>>> [2]
>>>>
>>> https://github.com/seam/solder/blob/develop/impl/src/test/java/org/jb
>>> oss/solder/test/util/AnnotationInstanceProviderTest.java
>>>> [3]
>>>>
>>> https://cwiki.apache.org/confluence/display/DeltaSpike/SE+Feature+Ran
>>> king
>>>>
>>>> --
>>>> Jason Porter
>>>> http://lightguard-jp.blogspot.com
>>>> http://twitter.com/lightguardjp
>>>>
>>>> Software Engineer
>>>> Open Source Advocate
>>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>>
>>>> PGP key id: 926CCFF5
>>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>>
>>>
>>>
>>>
>>> --
>>> Jason Porter
>>> http://lightguard-jp.blogspot.com
>>> http://twitter.com/lightguardjp
>>>
>>> Software Engineer
>>> Open Source Advocate
>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>
>>> PGP key id: 926CCFF5
>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>
>

Mime
View raw message