Package de.geolykt.starloader.deobf

# Class IntermediaryGenerator

java.lang.Object
de.geolykt.starloader.deobf.IntermediaryGenerator

public class IntermediaryGenerator extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IntermediaryGenerator(File input, Path map, Path output)`
  `IntermediaryGenerator(@Nullable Path map, Path output, @Nullable Collection<org.objectweb.asm.tree.ClassNode> nodes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addResources(@NotNull File input)`
  Adds resources from a jar file at a given location.
  `protected Map<String,List<String>>`
  `computeFullHierarchy(Map<String,List<String>> nearbyHierarchy)`
  `void`
  `deobfuscate()`
  `void`
  `doProposeEnumFieldsV2()`
  Proposes new field names within enum class that can be easily guessed by the computer.
  `List<org.objectweb.asm.tree.ClassNode>`
  `getAsClassNodes()`
  `void`
  `remapClassesV2()`
  `void`
  `remapClassesV2(boolean findLocalClasses)`
  `void`
  `remapGetters()`
  `void`
  `useAlternateClassNaming(boolean toggle)`
  Sets whether alternate class naming should be employed.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IntermediaryGenerator

    public IntermediaryGenerator(@Nullable @Nullable Path map, Path output, @Nullable @Nullable Collection<org.objectweb.asm.tree.ClassNode> nodes)

  - ### IntermediaryGenerator

    public IntermediaryGenerator(File input, Path map, Path output)

- ## Method Details

  - ### addResources

    public void addResources(@NotNull @NotNull File input) throws IOException
    Adds resources from a jar file at a given location. This is used for the `deobfuscate()` operation if and only if an output folder was chosen.
    Parameters:
      `input` - The file to scan for resources
    Throws:
      `IOException` - if an IO issue occurred

  - ### computeFullHierarchy

    protected Map<String,List<String>> computeFullHierarchy(Map<String,List<String>> nearbyHierarchy)

  - ### deobfuscate

    public void deobfuscate()

  - ### doProposeEnumFieldsV2

    public void doProposeEnumFieldsV2()
    Proposes new field names within enum class that can be easily guessed by the computer.

  - ### getAsClassNodes

    public List<org.objectweb.asm.tree.ClassNode> getAsClassNodes()

  - ### remapClassesV2

    public void remapClassesV2()

  - ### remapClassesV2

    public void remapClassesV2(boolean findLocalClasses)

  - ### remapGetters

    public void remapGetters()

  - ### useAlternateClassNaming

    public void useAlternateClassNaming(boolean toggle)
    Sets whether alternate class naming should be employed. This is very useful if obftools has to be updated or when the application to link to has changed. Making use of this feature eliminates large portions of issues where the classes have changed their name, but using the old name is still fully valid. This can cause subtle bugs that are very hard to trace. If the alternate naming scheme is on, classes are enumerated with the characters [0-9], where as they are enumerated with the characters [a-z] when the alternate naming scheme is off.
    Parameters:
      `toggle` - Whether to use the alternate class naming scheme.