diff options
| author | 2018-05-19 17:02:46 +0200 | |
|---|---|---|
| committer | 2018-05-19 17:02:46 +0200 | |
| commit | 2b2249e873c4adfd2dd6e8f1f2489ccd9f6aa021 (patch) | |
| tree | 14c8b1e806449ace1641a1dbafae162855f79670 /src/main/java/cuchaz/enigma/mapping/FieldDefEntry.java | |
| parent | Fix build (diff) | |
| download | enigma-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/FieldDefEntry.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/mapping/FieldDefEntry.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/FieldDefEntry.java b/src/main/java/cuchaz/enigma/mapping/FieldDefEntry.java new file mode 100644 index 0000000..262c16c --- /dev/null +++ b/src/main/java/cuchaz/enigma/mapping/FieldDefEntry.java | |||
| @@ -0,0 +1,34 @@ | |||
| 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 | |||
| 12 | package cuchaz.enigma.mapping; | ||
| 13 | |||
| 14 | import com.google.common.base.Preconditions; | ||
| 15 | import cuchaz.enigma.bytecode.AccessFlags; | ||
| 16 | |||
| 17 | public class FieldDefEntry extends FieldEntry { | ||
| 18 | private final AccessFlags access; | ||
| 19 | |||
| 20 | public FieldDefEntry(ClassEntry ownerEntry, String name, TypeDescriptor desc, AccessFlags access) { | ||
| 21 | super(ownerEntry, name, desc); | ||
| 22 | Preconditions.checkNotNull(access, "Field access cannot be null"); | ||
| 23 | this.access = access; | ||
| 24 | } | ||
| 25 | |||
| 26 | public AccessFlags getAccess() { | ||
| 27 | return access; | ||
| 28 | } | ||
| 29 | |||
| 30 | @Override | ||
| 31 | public FieldDefEntry updateOwnership(ClassEntry owner) { | ||
| 32 | return new FieldDefEntry(owner, this.name, this.desc, access); | ||
| 33 | } | ||
| 34 | } | ||