Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] detecting AspectJ classes


Eugene,

> Thanks Andy. The problem is that I need to do that without loading
>classes.

Why?

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



Eugene Kuleshov <eu@xxxxxxxx>
Sent by: aspectj-dev-bounces@xxxxxxxxxxx

17/10/2006 13:36

Please respond to
AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>

To
AspectJ developer discussions <aspectj-dev@xxxxxxxxxxx>
cc
Subject
Re: [aspectj-dev] detecting AspectJ classes






 Thanks Andy. The problem is that I need to do that without loading
classes.

 I see that iajc is adding @Aspect attribute with value that has
_expression_ for deployment model, but then I need to parse that
_expression_. Is there are some helper class that I can use to parse that
_expression_? Also, is this information is duplicated in some other
attribute, maybe org.aspectj.weaver.Aspect?

 regards,
 Eugene


Andy Clement wrote:
> See AjTypeSystem in the doc:
>
> http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/org/aspectj/lang/reflect/AjTypeSystem.html#getAjType(java.lang.Class)
>
>
> eg.
>
> AjType fooType = AjTypeSystem.getAjType(Foo.class);      
> boolean isAspect = fooType.isAspect()
> PerClause pc = fooType.getPerClause()
> assertEquals(PerClauseKind.PERTHIS,pc.getKind());
>
> the individual attribute format are not documented anywhere other than
> in the code.
>
>
> On 17/10/06, Eugene Kuleshov <eu@xxxxxxxx> wrote:
>> Hi,
>>
>>   I need to detect that some particular class is in fact an aspect and
>> then I would also need to retrieve details on its deployment mode (i.e.
>> singleton, percflow, pertarget, etc). What would be the most reliable
>> way of doing that?
>>
>>   Actually I wonder if AspectJ-specific bytecode attributes are
>> documented anywhere? It would be really handy to have something like VM
>> ClassFormat spec that would document standard attributes used by
>> AspectJ.
>>
>>   Thanks in advance
>>
>>   Eugene
>>
>>
>> _______________________________________________
>> aspectj-dev mailing list
>> aspectj-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top