[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Help? Testing APT with AJC?
|
Hi Andy.
I am attaching two sample projects (actually three, but two are to be used together):
A) SO_AJ_ITD_AddMainMethodToAllSubclasses_AJ + SO_AJ_ITD_AddMainMethodToAllSubclasses_APT
Add a main method to all subclasses of a specific class. Works in both AspectJ 1.8.6 and your Mars-based snapshot.
How to test:
- cd SO_AJ_ITD_AddMainMethodToAllSubclasses_AJ
- edit compile_run.bat in order to change SRC_PATH and ASPECTJ_HOME
- run compile.bat
B) SO_AJ_APT_MoveAnnotationsFromMemberToGetter
Copy parametrised marker annotations from members to corresponding getters. Works in AspectJ 1.8.6, but produces invalid Java source code for me in your Mars-based snapshot. There are a few places when I expect a double quote in my generated code, but there are two:
(...)\.apt_generated\de\scrum_master\app\AnnotateGetterAspect_Person_SortOrder_firstName.java:4 [error] Syntax error on token "descending", / expected
declare @method : * Person.getFirstName() : @de.scrum_master.app.SortOrder(value = ""descending"");
^^^^^
How to test:
- cd SO_AJ_APT_MoveAnnotationsFromMemberToGetter
- edit compile_run.bat in order to change SRC_PATH and ASPECTJ_HOME
- run compile.bat
I hope this helps. Maybe you can refactor the code to become unit or integrations tests.
Kind regards
--
Alexander Kriegisch
http://scrum-master.de
Andy Clement schrieb am 26.06.2015 00:40:
> That’d be awesome. I don’t think it is so much about Java8, more about
> APT. If you can kick the tires on it, that’d be really helpful. Dev build
> is here:
>
> I’ve put a 1.8.7.BUILD-SNAPSHOT in repo.spring.io maven repo snapshots
> area and the download for the distro is here:
>
> http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/dev/aspectj-DEVELOPMENT-20150625140000.jar
>
>
>> On Jun 25, 2015, at 1:32 PM, Alexander Kriegisch
>> <Alexander@xxxxxxxxxxxxxx
>> <mailto:Alexander@xxxxxxxxxxxxxx> > wrote:
>>
>>
>> I have one or two test cases somewhere, not for my own use but rather
>> prepared to answer other people's questions. Maybe I can quickly run them
>> during the weekend. Probably the coverage will be rather superficial
>> though, especially with regard to Java 8 features.
>>
>>
>>> Am 25.06.2015 um 22:22 schrieb Andy Clement <andrew.clement@xxxxxxxxx
>>> <mailto:andrew.clement@xxxxxxxxx> >:
>>>
>>> I’ve just upgraded AspectJ to be based on the Eclipse Mars compiler.
>>> This was a lot of change, we picked up loads and loads of fixes to Java8
>>> compilation, definitely worth doing. However, it has disturbed the APT
>>> integration. Is there anyone out there using annotation processing with
>>> AspectJ that could help me by testing a build?
Attachment:
AspectJ_APT.zip
Description: Zip archive