summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/bytecode/MethodParameterWriter.java
diff options
context:
space:
mode:
authorGravatar jeff2014-08-02 16:45:32 -0400
committerGravatar jeff2014-08-02 16:45:32 -0400
commitada041979ecf3dfd4543f3c250fcc78ad594866c (patch)
treeaf96a76ae6e1fbc9932de271defb6f4bdc42e565 /src/cuchaz/enigma/bytecode/MethodParameterWriter.java
parentfixed bug with save mappings menu (diff)
downloadenigma-fork-ada041979ecf3dfd4543f3c250fcc78ad594866c.tar.gz
enigma-fork-ada041979ecf3dfd4543f3c250fcc78ad594866c.tar.xz
enigma-fork-ada041979ecf3dfd4543f3c250fcc78ad594866c.zip
started working on method parameter renaming
Diffstat (limited to 'src/cuchaz/enigma/bytecode/MethodParameterWriter.java')
-rw-r--r--src/cuchaz/enigma/bytecode/MethodParameterWriter.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/bytecode/MethodParameterWriter.java b/src/cuchaz/enigma/bytecode/MethodParameterWriter.java
new file mode 100644
index 0000000..1e5d1f0
--- /dev/null
+++ b/src/cuchaz/enigma/bytecode/MethodParameterWriter.java
@@ -0,0 +1,35 @@
1/*******************************************************************************
2 * Copyright (c) 2014 Jeff Martin.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Public License v3.0
5 * which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/gpl.html
7 *
8 * Contributors:
9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/
11package cuchaz.enigma.bytecode;
12
13import javassist.CtBehavior;
14import javassist.CtClass;
15import javassist.bytecode.AttributeInfo;
16import cuchaz.enigma.mapping.Translator;
17
18public class MethodParameterWriter
19{
20 private Translator m_translator;
21
22 public MethodParameterWriter( Translator translator )
23 {
24 m_translator = translator;
25 }
26
27 public void writeMethodArguments( CtClass c )
28 {
29 // Procyon will read method arguments from the "MethodParameters" attribute, so write those
30 for( CtBehavior behavior : c.getDeclaredBehaviors() )
31 {
32 AttributeInfo attribute = behavior.getMethodInfo().getAttribute( "MethodParameter" );
33 }
34 }
35}