diff options
Diffstat (limited to 'src/cuchaz/enigma/bytecode/MethodParameterWriter.java')
| -rw-r--r-- | src/cuchaz/enigma/bytecode/MethodParameterWriter.java | 35 |
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 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.bytecode; | ||
| 12 | |||
| 13 | import javassist.CtBehavior; | ||
| 14 | import javassist.CtClass; | ||
| 15 | import javassist.bytecode.AttributeInfo; | ||
| 16 | import cuchaz.enigma.mapping.Translator; | ||
| 17 | |||
| 18 | public 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 | } | ||