I am currently using AspectJ to generate Client implementation code for my AWS Activity's. This has generally been working really well for both workflows and activitys.
Its worth noting I don't know alot about AspectJ as I am only using it for this code generation.
However I have reached a point were I wish to return an array from an activity and this prevents that activity class from generating its client implementation (It also prevents some workflow code generation, but I think this is a side affect). If I turn the array into a List (just for a point of test) everything seams to work again. I have had no problems passing arrays to activity's only returning them.
To clarify structure. I have an interface which defines the activity and an implementation class which performs the implementation ... so nothing too crazy.
Broken:
public String[] myMethod( String a, String b, String c ) throws Exception;
Works:
public List<String> myMethod( String a, String b, String c ) throws Exception;
As far as I can see I cannot see any AspectJ compilation errors, but I'm only really looking at the consoles.
The only logs I have found show that the generation was complete, but they do report that the total file generated count is different (as expected because its broken ).
Broken:
:B: 9:53:40 Compiler configuration for project TestProj doesn't know previous state, so assuming EVERYTHING has changed.
:B: 9:53:40 ===========================================================================================
:B: 9:53:40 Build kind = FULLBUILD
:B: 9:53:40 Project=TestProj, kind of build requested=Full AspectJ compilation
:B: 9:53:40 Timer event: 0ms: Flush included source file cache
:B: 9:53:40 Timer event: 0ms: Check delta
:B: 9:53:40 Builder: Tidied output folder(s), removed class files and derived resources
:B: 9:53:40 Timer event: 160ms: Pre compile
:B: 9:53:40 Compiler configuration for project TestProj has been read by compiler. Resetting.
:B: 9:53:40 Configuration was [PROJECTSOURCEFILES_CHANGED, JAVAOPTIONS_CHANGED, ASPECTPATH_CHANGED, CLASSPATH_CHANGED, INPATH_CHANGED, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, PROJECTSOURCERESOURCES_CHANGED, OUTPUTDESTINATIONS_CHANGED, INJARS_CHANGED]
:B: 9:53:40 Resetting list of modified source files. Was null
:C: 9:53:40 Preparing for build: not going to be incremental because no successful previous full build
:C: 9:53:41 Timer event: 850ms: Time to first compiled message
:C: 9:53:41 Timer event: 860ms: Time to first woven message
:C: 9:53:42 AspectJ reports build successful, build was: FULL
:C: 9:53:42 AJDE Callback: finish. Was full build: true
:B: 9:53:42 Timer event: 1560ms: Total time spent in AJDE
:B: 9:53:42 Timer event: 0ms: Refresh after build
:C: 9:53:42 Types affected during build = 166
:B: 9:53:42 Timer event: 2436ms: Total time spent in AJBuilder.build()
:B: 9:53:43 Timer event: 10ms: Update visualizer, xref, advice listeners for (separate thread): TestProj
:B: 9:53:43 Timer event: 20ms: Delete markers: TestProj (Finished deleting markers for TestProj)
:B: 9:53:43 Timer event: 570ms: Create markers: TestProj (Finished creating markers for TestProj)
:B: 9:53:43 Created 7 markers in 176 files
Working:
:B: 9:54:55 Timer event: 0ms: Delete markers: TestProj (Finished deleting markers for TestProj)
:B: 9:55:6 Compiler configuration for project TestProj doesn't know previous state, so assuming EVERYTHING has changed.
:B: 9:55:6 ===========================================================================================
:B: 9:55:6 Build kind = FULLBUILD
:B: 9:55:6 Project=TestProj, kind of build requested=Full AspectJ compilation
:B: 9:55:6 Timer event: 0ms: Flush included source file cache
:B: 9:55:6 Timer event: 0ms: Check delta
:B: 9:55:6 Builder: Tidied output folder(s), removed class files and derived resources
:B: 9:55:6 Timer event: 250ms: Pre compile
:B: 9:55:6 Compiler configuration for project TestProj has been read by compiler. Resetting.
:B: 9:55:6 Configuration was [PROJECTSOURCEFILES_CHANGED, JAVAOPTIONS_CHANGED, ASPECTPATH_CHANGED, CLASSPATH_CHANGED, INPATH_CHANGED, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, PROJECTSOURCERESOURCES_CHANGED, OUTPUTDESTINATIONS_CHANGED, INJARS_CHANGED]
:B: 9:55:6 Resetting list of modified source files. Was null
:C: 9:55:6 Preparing for build: not going to be incremental because no successful previous full build
:C: 9:55:7 Timer event: 970ms: Time to first compiled message
:C: 9:55:7 Timer event: 970ms: Time to first woven message
:C: 9:55:8 AspectJ reports build successful, build was: FULL
:C: 9:55:8 AJDE Callback: finish. Was full build: true
:B: 9:55:8 Timer event: 2420ms: Total time spent in AJDE
:B: 9:55:8 Timer event: 0ms: Refresh after build
:C: 9:55:10 Types affected during build = 320
:B: 9:55:10 Timer event: 3741ms: Total time spent in AJBuilder.build()
:B: 9:55:10 Timer event: 10ms: Update visualizer, xref, advice listeners for (separate thread): TestProj
:B: 9:55:10 Timer event: 30ms: Delete markers: TestProj (Finished deleting markers for TestProj)
:B: 9:55:10 Timer event: 100ms: Create markers: TestProj (Finished creating markers for TestProj)
:B: 9:55:10 Created 28 markers in 320 files
I'm not convinced that the logs tell me anything, but I thought that they might mean something to someone else.
I am reluctant to Use the List implementation as When the activity will recvies a primitives like int[] I will not be able to directly convert them to List which is just an overhead for all activity's.
I will be grateful for any advice.