Tabnine Logo
Watermarker.createInstructions
Code IndexAdd Tabnine to your IDE (free)

How to use
createInstructions
method
in
me.itzsomebody.radon.transformers.miscellaneous.watermarker.Watermarker

Best Java code snippets using me.itzsomebody.radon.transformers.miscellaneous.watermarker.Watermarker.createInstructions (Showing top 1 results out of 315)

origin: ItzSomebody/Radon

@Override
public void transform() {
  ArrayList<ClassWrapper> classWrappers = new ArrayList<>(this.getClassWrappers());
  for (int i = 0; i < 3; i++) { // Two extra injections helps with reliability of watermark to be extracted
    Stack<Character> watermark = cipheredWatermark();
    while (!watermark.isEmpty()) {
      ClassWrapper classWrapper;
      int counter = 0;
      do {
        classWrapper = classWrappers.get(RandomUtils.getRandomInt(0, classWrappers.size()));
        counter++;
        if (counter > 20)
          throw new RuntimeException("Radon couldn't find any methods to embed a watermark in after " + counter + "tries.");
      } while (classWrapper.classNode.methods.size() != 0);
      MethodNode methodNode = classWrapper.classNode.methods.get(RandomUtils.getRandomInt(0,
          classWrapper.classNode.methods.size()));
      if (hasInstructions(methodNode)) {
        methodNode.instructions.insertBefore(methodNode.instructions.getFirst(),
            createInstructions(watermark, methodNode));
      }
    }
  }
  LoggerUtils.stdOut("Successfully embedded watermark.");
}
me.itzsomebody.radon.transformers.miscellaneous.watermarkerWatermarkercreateInstructions

Popular methods of Watermarker

  • <init>
  • getSetup
  • cipheredWatermark
  • getClassWrappers
  • hasInstructions

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Kernel (java.awt.image)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now