[webbeans-dev] XML Annotation Configurations

Gurkan Erdogdu gurkanerdogdu at yahoo.com
Sat Dec 13 00:56:05 EST 2008


Thanks. I did try it already :) , but no success, problems with equals, hashCode, toString methods. Ok, try to implement it again.

Gurkan



________________________________
From: Gavin King <gavin.king at gmail.com>
To: Gurkan Erdogdu <gurkanerdogdu at yahoo.com>
Cc: "webbeans-dev at lists.jboss.org" <webbeans-dev at lists.jboss.org>
Sent: Saturday, December 13, 2008 4:00:56 AM
Subject: Re: [webbeans-dev] XML Annotation Configurations


Annotation types are interfaces; just implement them :)

Sent from my iPhone

On Dec 12, 2008, at 2:18 PM, Gurkan Erdogdu <gurkanerdogdu at yahoo.com> wrote:


Hi;

While parsing the XML file for Binding annotations, we get class files for binding annotation in hand, but we are not able to instantiate Annotation object from this file . But when resolving injection points, the API expects Annotation array in the Manager API.

For example; in XML injection point decleration, such as Initializer method

<myapp:setPaymentProcessor>
    <Initializer/>
    <myapp:PaymentProcessor>
        <myapp:PayBy>CHEQUE</myapp:PayBy>
    </myapp:PaymentProcessor>
    <myfwk:Logger/>
</myapp:setPaymentProcessor>

PayBy is a binding type but we can get just class name of this binding type with Class.forName(""). How could create the Annotation object from this class file to input into the Manager resolution methods to resolve parameters? 

Or this definition means that, setPaymentProcessor method has already PaymentProcessor type parameter with PayBy annotation and we just care this annotation not other binding annotations (i.o.w binding type that is configured in the XML has to be declared in the method ?) , for example; 

In class;

....
{
  public void setPaymentProcessor(@PayBy(CHEQUE) @OtherBinding param1){} --> We just care about @PayBy? 
}


So we can get Annotation with using method.getGenericParameterTypes()?

Thanks;

Gurkan


_______________________________________________
webbeans-dev mailing list
webbeans-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/webbeans-dev



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20081212/24111411/attachment.html 


More information about the weld-dev mailing list