<target name="package" description="Jarjar asm-5.0.4.jar and prefix package name with aj"> | <target name="package" description="Jarjar asm-5.0.4.jar and prefix package name with aj"> | ||||
<jarjar destfile="asm-6.0_BETA.renamed.jar"> | <jarjar destfile="asm-6.0_BETA.renamed.jar"> | ||||
<zipfileset src="asm-6.0_BETA.jar"/> | |||||
<zipfileset src="asm-6.0_BETA.jar" excludes="module-info.class"/> | |||||
<rule pattern="org.objectweb.asm.**" result="aj.org.objectweb.asm.@1"/> | <rule pattern="org.objectweb.asm.**" result="aj.org.objectweb.asm.@1"/> | ||||
</jarjar> | </jarjar> | ||||
</target> | </target> |
package com.foo1; | |||||
public class C1 {} |
module e.f.g { | |||||
exports com.foo1; | |||||
} |
package aaa.bbb; | |||||
public class A { | |||||
public static void main(String []argv) { | |||||
System.out.println("A running"); | |||||
} | |||||
} |
module my.module { | |||||
exports aaa.bbb; | |||||
} |
import aaa.bbb.A; | |||||
public class InvokeA { | |||||
public static void main(String[] argv) { | |||||
A.main(argv); | |||||
} | |||||
} |
package aaa.bbb; | |||||
public class A { | |||||
public static void main(String []argv) { | |||||
System.out.println("A running"); | |||||
} | |||||
} |
module my.module { | |||||
exports aaa.bbb; | |||||
} |
import aaa.bbb.A; | |||||
public class InvokeA { | |||||
public static void main(String[] argv) { | |||||
A.main(argv); | |||||
} | |||||
} |
package aaa.bbb; | |||||
public class A { | |||||
public static void main(String []argv) { | |||||
System.out.println("A running"); | |||||
} | |||||
} |
module my.module { | |||||
} |
package aspects; | |||||
public aspect Azpect { | |||||
before(): execution(* main(..)) { | |||||
System.out.println("Azpect running"); | |||||
} | |||||
} |
package aaa.bbb; | |||||
public class A { | |||||
public static void main(String []argv) { | |||||
System.out.println("A running"); | |||||
} | |||||
} |
module my.module { | |||||
exports aaa.bbb; | |||||
} |
package extra; | |||||
public aspect AnotherAzpect { | |||||
before(): execution(* *(..)) && !within(*Azpect) { | |||||
System.out.println("AnotherAzpect running"); | |||||
} | |||||
} |
module demo { | |||||
exports pkg; | |||||
requires org.aspectj.runtime; | |||||
} |
package otherpkg; | |||||
public aspect Azpect { | |||||
before(): execution(* *(..)) && !within(Azpect) { | |||||
System.out.println("Azpect running"); | |||||
} | |||||
} |
package pkg; | |||||
public class Demo { | |||||
public static void main(String[] argv) { | |||||
System.out.println("Demo running"); | |||||
} | |||||
} |