[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] using @declaredParents for annotations
|
Did you try the code from my previous reply?
@DeclareParents(value="@gov.hhs.acf.aop.aspects.WorkflowAware *",
defaultImpl=DefaultWorkflowMetaData.class)
public static WorkflowMetaData workflowMetaData1;
-Ramnivas
On Thu, Dec 11, 2008 at 11:46 PM, miro <miroconnect@xxxxxxxxx> wrote:
>
> I need all classes with some annotation to implement an interface
>
> my aspect code
>
> @DeclareParents(value="gov.hhs.acf.aop.aspects.WorkflowAware",
> defaultImpl=DefaultWorkflowMetaData.class)
> public static WorkflowMetaData workflowMetaData1;
>
>
> here gov.hhs.acf.aop.aspects.WorkflowAware is an annotation.
>
> here the definitaion of annotation
>
>
> @Target(ElementType.TYPE)
> @Retention(RetentionPolicy.RUNTIME)
> public @interface WorkflowAware {
>
> }
>
>
> next I added this annotation to a class
>
> @WorkflowAware
> public class AuditProgReviewDTO
>
> i am assuming this make AuditProgReviewDTO implement WorkflowMetaData
> , but this is not happening and here the output from aspectj:compile
>
> [WARNING] annotation type gov.hhs.acf.aop.aspects.WorkflowAware matches a
> declare parents type pattern but is being ignored
> [Xlint:annotationAsTargetForDecpIgnored]
>
> please tell me how to use an annotation as a jointpoint
>
>
>
>
>
> Ramnivas Laddad wrote:
>>
>> On Thu, Dec 11, 2008 at 10:12 PM, miro <miroconnect@xxxxxxxxx> wrote:
>>>
>>> I want to use @decalredParents for an annotation
>>>
>>> my aspect
>>>
>>>
>>> @DeclareParents("@annotation(gov.hhs.acf.aop.aspects.WorkflowAware)",
>>> defaultImpl=DefaultWorkflowMetaData.class)
>>> public static WorkflowMetaData workflowMetaData1;
>>>
>>
>> @DeclareParents(value="@gov.hhs.acf.aop.aspects.WorkflowAware *",
>> defaultImpl=DefaultWorkflowMetaData.class)
>> public static WorkflowMetaData workflowMetaData1;
>>
>>>
>>> @Target(ElementType.TYPE)
>>> @Retention(RetentionPolicy.CLASS)
>>> public @interface WorkflowAware {
>>>
>>> }
>>>
>>> what I want is all classes which have WorkflowAware annotaton should
>>> implement WorkflowMetaData please help me write the proper syntax
>>>
>>>
>>>
>>> @DeclareParents(value="gov.hhs.acf.web.pages.auditprog.*",
>>> defaultImpl=DefaultWorkflowMetaData.class)
>>> public static WorkflowMetaData workflowMetaData;
>>
>> This looks fine.
>>
>>>
>>>
>>> this works for me can I add to this all classes with annotation
>>> WorkflowAware ?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/using-%40declaredParents--for-annotations-tp20969256p20969256.html
>>> Sent from the AspectJ - users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> aspectj-users mailing list
>>> aspectj-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/using-%40declaredParents--for-annotations-tp20969256p20969891.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>