from what i see its not a matter of spring like or dislike..its a matter of 
keeping JDK class file consist

aj => .java => .class

kt => .java => .class

but this same scenario goes fubar when you switch JDKs ..this is an example

aj => 1_dot_eight.java => 1_dot_eight.class

kt  => 1_dot_nine.java => 1_dot_none.class

because spring is native compiled to 1.8 class format ..all .aj and all .kt dsl 
files will compile to 1.8 class
access to class files in jar is no problem
doing reflection e.g. Class.forName(One_dot_eight); also no problem

things fall apart quickly with aj, kt or .java files when you mix 1.8 class 
files with 1.9 class files

(1.9 lambda functions fubar on accessing 1.8 class files)

maven folk say full compile the whole lot to your runtime JDK will supposedly 
cure this scenario

is this what you're experiencing?

martin-
https://stackoverflow.com/questions/36780990/convert-inter-type-declaraton-from-aj-to-java-with-aspect-annotations
https://stackoverflow.com/questions/34957430/how-to-convert-a-kotlin-source-file-to-a-java-source-file
[https://cdn.sstatic.net/Sites/stackoverflow/img/[email protected]?v=73d79a89bded]<https://stackoverflow.com/questions/34957430/how-to-convert-a-kotlin-source-file-to-a-java-source-file>

How to convert a kotlin source file to a java source file - Stack Overflow - 
Stack Overflow - Where Developers Learn, Share, & Build 
Careers<https://stackoverflow.com/questions/34957430/how-to-convert-a-kotlin-source-file-to-a-java-source-file>
To convert a Kotlin source file to a Java source file you need to (when you in 
Android Studio):. Press Cmd-Shift-A on a Mac, or press Ctrl-Shift-A on a 
Windows machine.. Type the action you're looking for: Kotlin Bytecode and 
choose Show Kotlin Bytecode from menu. Press Decompile button on the top of 
Kotlin Bytecode panel.; Now you get a Decompiled Java file along with Kotlin 
file in a ...
stackoverflow.com



[https://cdn.sstatic.net/Sites/stackoverflow/img/[email protected]?v=73d79a89bded]<https://stackoverflow.com/questions/36780990/convert-inter-type-declaraton-from-aj-to-java-with-aspect-annotations>

aop - Convert Inter-Type declaraton from .aj to .java with Aspect annotations - 
Stack Overflow - Stack Overflow - Where Developers Learn, Share, & Build 
Careers<https://stackoverflow.com/questions/36780990/convert-inter-type-declaraton-from-aj-to-java-with-aspect-annotations>
What you want is not possible with @AspectJ style, you need to use the more 
powerful native syntax. (Why do you want to switch anyway?) The reason behind 
this is that the Java compiler can only convert @DeclareParents to a form in 
which Village is a subclass of whatever interface implementation you define in 
your aspect, for example something like this:
stackoverflow.com



________________________________
From: [email protected] <[email protected]> on 
behalf of Matthew Adams <[email protected]>
Sent: Monday, May 13, 2019 5:53 PM
To: [email protected]
Subject: [aspectj-users] Formal support for Kotlin?

Hi all,

I’ve been doing some googling around to see what I can find with regard to 
using AspectJ with Kotlin.  Things don’t look particularly great at first 
glance:  
https://stackoverflow.com/questions/44364633/aspectj-doesnt-work-with-kotlin

There are of course many more hits, but it appears the current state of the art 
is to compile with kotlin, then apply AspectJ to the kotlin .class files.

Problem is, we have some libraries that we can only compile via ajc due to 
their design, so I’m wondering what thought has been given to adding kotlin 
language support to ajc.  I didn’t see any issues requesting Kotlin language 
support in ajc so far.  Kotlin looks promising, and it appears that Spring also 
is liking Kotlin enough to add support for it.  I’d love to have my Kotlin & 
AspectJ, too.

Any comments, folks?

-matthew

_______________________________________________
aspectj-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to