summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java
diff options
context:
space:
mode:
authorGravatar gegy10002018-05-19 17:02:46 +0200
committerGravatar gegy10002018-05-19 17:02:46 +0200
commit2b2249e873c4adfd2dd6e8f1f2489ccd9f6aa021 (patch)
tree14c8b1e806449ace1641a1dbafae162855f79670 /src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java
parentFix build (diff)
downloadenigma-fork-2b2249e873c4adfd2dd6e8f1f2489ccd9f6aa021.tar.gz
enigma-fork-2b2249e873c4adfd2dd6e8f1f2489ccd9f6aa021.tar.xz
enigma-fork-2b2249e873c4adfd2dd6e8f1f2489ccd9f6aa021.zip
Initial port to ASM
Diffstat (limited to 'src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java')
-rw-r--r--src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java b/src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java
new file mode 100644
index 0000000..d6a160d
--- /dev/null
+++ b/src/main/java/cuchaz/enigma/mapping/MethodDefEntry.java
@@ -0,0 +1,35 @@
1/*******************************************************************************
2 * Copyright (c) 2015 Jeff Martin.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser General Public
5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html
7 * <p>
8 * Contributors:
9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/
11
12package cuchaz.enigma.mapping;
13
14import com.google.common.base.Preconditions;
15import cuchaz.enigma.bytecode.AccessFlags;
16
17public class MethodDefEntry extends MethodEntry {
18
19 private final AccessFlags access;
20
21 public MethodDefEntry(ClassEntry classEntry, String name, MethodDescriptor descriptor, AccessFlags access) {
22 super(classEntry, name, descriptor);
23 Preconditions.checkNotNull(access, "Method access cannot be null");
24 this.access = access;
25 }
26
27 public AccessFlags getAccess() {
28 return access;
29 }
30
31 @Override
32 public MethodDefEntry updateOwnership(ClassEntry classEntry) {
33 return new MethodDefEntry(new ClassEntry(classEntry.getName()), name, descriptor, access);
34 }
35}