forked from MinecraftForge/FernFlowerLegacy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
337 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/org/jetbrains/java/decompiler/main/IdentityRenamerFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.jetbrains.java.decompiler.main; | ||
|
||
import java.util.Map; | ||
|
||
import org.jetbrains.java.decompiler.main.extern.IVariableNameProvider; | ||
import org.jetbrains.java.decompiler.main.extern.IVariableNamingFactory; | ||
import org.jetbrains.java.decompiler.modules.decompiler.vars.VarVersionPair; | ||
import org.jetbrains.java.decompiler.struct.StructMethod; | ||
|
||
public class IdentityRenamerFactory implements IVariableNamingFactory, IVariableNameProvider { | ||
@Override | ||
public IVariableNameProvider createFactory(StructMethod method) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public String renameAbstractParameter(String abstractParam) { | ||
return abstractParam; | ||
} | ||
|
||
@Override | ||
public Map<VarVersionPair, String> rename(Map<VarVersionPair, String> variables) { | ||
return null; | ||
} | ||
@Override | ||
public void addParentContext(IVariableNameProvider renamer) { | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/org/jetbrains/java/decompiler/main/extern/IVariableNameProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jetbrains.java.decompiler.main.extern; | ||
|
||
import java.util.Map; | ||
|
||
import org.jetbrains.java.decompiler.modules.decompiler.vars.VarVersionPair; | ||
|
||
public interface IVariableNameProvider { | ||
public Map<VarVersionPair,String> rename(Map<VarVersionPair,String> variables); | ||
public String renameAbstractParameter(String abstractParam); | ||
public void addParentContext(IVariableNameProvider renamer); | ||
} |
7 changes: 7 additions & 0 deletions
7
src/org/jetbrains/java/decompiler/main/extern/IVariableNamingFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.jetbrains.java.decompiler.main.extern; | ||
|
||
import org.jetbrains.java.decompiler.struct.StructMethod; | ||
|
||
public interface IVariableNamingFactory { | ||
public IVariableNameProvider createFactory(StructMethod structMethod); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.