From 406b9a89318473571d27de60b8aa1b51f84af245 Mon Sep 17 00:00:00 2001 From: gegy1000 Date: Sat, 19 May 2018 17:06:26 +0200 Subject: Package updates --- .../java/cuchaz/enigma/mapping/ClassEntry.java | 171 --------------------- 1 file changed, 171 deletions(-) delete mode 100644 src/main/java/cuchaz/enigma/mapping/ClassEntry.java (limited to 'src/main/java/cuchaz/enigma/mapping/ClassEntry.java') diff --git a/src/main/java/cuchaz/enigma/mapping/ClassEntry.java b/src/main/java/cuchaz/enigma/mapping/ClassEntry.java deleted file mode 100644 index a49f8dd..0000000 --- a/src/main/java/cuchaz/enigma/mapping/ClassEntry.java +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 Jeff Martin. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser General Public - * License v3.0 which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/lgpl.html - *
- * Contributors:
- * Jeff Martin - initial API and implementation
- ******************************************************************************/
-
-package cuchaz.enigma.mapping;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-
-import java.util.List;
-
-public class ClassEntry implements Entry {
-
- private final String name;
-
- public ClassEntry(String className) {
- Preconditions.checkNotNull(className, "Class name cannot be null");
-
- if (className.indexOf('.') >= 0) {
- throw new IllegalArgumentException("Class name must be in JVM format. ie, path/to/package/class$inner : " + className);
- }
-
- this.name = className;
-
- if (isInnerClass() && getInnermostClassName().indexOf('/') >= 0) {
- throw new IllegalArgumentException("Inner class must not have a package: " + className);
- }
- }
-
- public ClassEntry(ClassEntry other) {
- this.name = other.name;
- }
-
- @Override
- public String getName() {
- return this.name;
- }
-
- @Override
- public String getClassName() {
- return this.name;
- }
-
- @Override
- public ClassEntry getOwnerClassEntry() {
- return this;
- }
-
- @Override
- public ClassEntry updateOwnership(ClassEntry classEntry) {
- return classEntry;
- }
-
- @Override
- public int hashCode() {
- return this.name.hashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- return other instanceof ClassEntry && equals((ClassEntry) other);
- }
-
- public boolean equals(ClassEntry other) {
- return other != null && this.name.equals(other.name);
- }
-
- @Override
- public String toString() {
- return this.name;
- }
-
- public boolean isInnerClass() {
- return this.name.lastIndexOf('$') >= 0;
- }
-
- public List