package com.uniquepassive.mystery.core;

import com.uniquepassive.mystery.Configuration;
import com.uniquepassive.mystery.core.obfuscators.modifiers.LineNumberModifier;
import com.uniquepassive.mystery.core.obfuscators.modifiers.renaming.ClassRenaming;
import com.uniquepassive.mystery.core.obfuscators.modifiers.renaming.MemberRenaming;
import com.uniquepassive.mystery.core.obfuscators.modifiers.renaming.provider.RandomNumberClassNameProvider;
import com.uniquepassive.mystery.core.obfuscators.modifiers.renaming.provider.RandomNumberMemberNameProvider;
import com.uniquepassive.mystery.core.obfuscators.shuffling.IdentifierShuffler;
import com.uniquepassive.mystery.util.JarUtil;

import java.io.File;
import java.io.IOException;

public class Mystery {

    public void run(Configuration configuration)
            throws IOException {

        MemberRenaming memberRenaming = new MemberRenaming(new RandomNumberMemberNameProvider());
        memberRenaming.run(configuration.getInClasses(), configuration.getTargetClasses());

        ClassRenaming classRenaming = new ClassRenaming(new RandomNumberClassNameProvider());
        classRenaming.run(configuration.getInClasses(), configuration.getTargetClasses());

        LineNumberModifier lineNumberModifier
                = new LineNumberModifier(configuration.getLineNumbersAction(), configuration.getInfoOut());
        lineNumberModifier.run(configuration.getTargetClasses());

        IdentifierShuffler identifierShuffler = new IdentifierShuffler();
        identifierShuffler.run(configuration.getTargetClasses());

        JarUtil.saveToFile(new File(configuration.getOutJar()), configuration.getInClasses().values());
    }
}

@@ -831,24 +831,308 @@
 xception %7B%0A%0A
+        if (configuration.getInClasses().isEmpty()) %7B%0A            throw new IllegalStateException(%22There are no in classes!%22);%0A        %7D%0A%0A        if (configuration.getTargetClasses().isEmpty()) %7B%0A            throw new IllegalStateException(%22There are no target classes!%22);%0A        %7D%0A%0A
         Memb

Terminate program if there are no in-classes or target classes