diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/mapping/entry/MethodDefEntry.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/mapping/entry/MethodDefEntry.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/entry/MethodDefEntry.java b/src/main/java/cuchaz/enigma/mapping/entry/MethodDefEntry.java index 1d2c094d..ec3af694 100644 --- a/src/main/java/cuchaz/enigma/mapping/entry/MethodDefEntry.java +++ b/src/main/java/cuchaz/enigma/mapping/entry/MethodDefEntry.java | |||
| @@ -14,23 +14,31 @@ package cuchaz.enigma.mapping.entry; | |||
| 14 | import com.google.common.base.Preconditions; | 14 | import com.google.common.base.Preconditions; |
| 15 | import cuchaz.enigma.bytecode.AccessFlags; | 15 | import cuchaz.enigma.bytecode.AccessFlags; |
| 16 | import cuchaz.enigma.mapping.MethodDescriptor; | 16 | import cuchaz.enigma.mapping.MethodDescriptor; |
| 17 | import cuchaz.enigma.mapping.Signature; | ||
| 17 | 18 | ||
| 18 | public class MethodDefEntry extends MethodEntry { | 19 | public class MethodDefEntry extends MethodEntry { |
| 19 | 20 | ||
| 20 | private final AccessFlags access; | 21 | private final AccessFlags access; |
| 22 | private final Signature signature; | ||
| 21 | 23 | ||
| 22 | public MethodDefEntry(ClassEntry classEntry, String name, MethodDescriptor descriptor, AccessFlags access) { | 24 | public MethodDefEntry(ClassEntry classEntry, String name, MethodDescriptor descriptor, Signature signature, AccessFlags access) { |
| 23 | super(classEntry, name, descriptor); | 25 | super(classEntry, name, descriptor); |
| 24 | Preconditions.checkNotNull(access, "Method access cannot be null"); | 26 | Preconditions.checkNotNull(access, "Method access cannot be null"); |
| 27 | Preconditions.checkNotNull(signature, "Method signature cannot be null"); | ||
| 25 | this.access = access; | 28 | this.access = access; |
| 29 | this.signature = signature; | ||
| 26 | } | 30 | } |
| 27 | 31 | ||
| 28 | public AccessFlags getAccess() { | 32 | public AccessFlags getAccess() { |
| 29 | return access; | 33 | return access; |
| 30 | } | 34 | } |
| 31 | 35 | ||
| 36 | public Signature getSignature() { | ||
| 37 | return signature; | ||
| 38 | } | ||
| 39 | |||
| 32 | @Override | 40 | @Override |
| 33 | public MethodDefEntry updateOwnership(ClassEntry classEntry) { | 41 | public MethodDefEntry updateOwnership(ClassEntry classEntry) { |
| 34 | return new MethodDefEntry(new ClassEntry(classEntry.getName()), name, descriptor, access); | 42 | return new MethodDefEntry(new ClassEntry(classEntry.getName()), name, descriptor, signature, access); |
| 35 | } | 43 | } |
| 36 | } | 44 | } |