Dev_S

Untitled

Jan 18th, 2021
2,093
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.ArrayList;
  2. import java.util.function.Consumer;
  3. import net.devtech.testbytecodemerge.annotation.Access;
  4. import net.devtech.testbytecodemerge.annotation.Interface;
  5. import net.devtech.testbytecodemerge.annotation.Parent;
  6. import net.devtech.testbytecodemerge.annotation.Platform;
  7.  
  8. @Parent(
  9.     platform = {@Platform({"A"})},
  10.     parent = ArrayList.class
  11. )
  12. @Interface(
  13.     platform = {@Platform({"A"})},
  14.     parent = Runnable.class
  15. )
  16. @Access(
  17.     platforms = {@Platform({"B"})},
  18.     flags = {"package-private", "interface"}
  19. )
  20. public class ClassA implements Runnable, Consumer<Integer> {
  21.     @Platform({"A"})
  22.     public void testChangeDescriptor(int oldArg) {
  23.         if (oldArg == 0) {
  24.             System.out.println("changed descriptor");
  25.         }
  26.  
  27.     }
  28.  
  29.     @Platform({"B"})
  30.     public static void byteCodeChange() {
  31.         System.out.println("hello!");
  32.     }
  33.  
  34.     @Platform({"B"})
  35.     public void testChangeDescriptor(int oldArg, int newArg) {
  36.         if (oldArg == 0) {
  37.             System.out.println("changed descriptor");
  38.         }
  39.  
  40.     }
  41.  
  42.     @Platform({"A"})
  43.     public void accept(Integer integer) {
  44.     }
  45.  
  46.     @Platform({"A"})
  47.     public void run() {
  48.     }
  49.  
  50.     @Platform({"B"})
  51.     public void accept_0(Integer integer) {
  52.         System.out.println(integer);
  53.     }
  54.  
  55.     @Platform({"A"})
  56.     public void oneSide() {
  57.     }
  58.  
  59.     @Platform({"A"})
  60.     public static void byteCodeChange_1() {
  61.         if (Boolean.getBoolean("test")) {
  62.             System.out.println("hello!");
  63.         }
  64.  
  65.     }
  66.  
  67.     public void testVoid() {
  68.         System.out.println("hello");
  69.     }
  70.  
  71.     @Platform({"A"})
  72.     public ClassA() {
  73.     }
  74. }
RAW Paste Data