forked from openrs2/openrs2
The dependency/interface properties are translated to getDependency and getInterface. I don't know if it is possible to fix this, but it won't matter when the rest of the codebase is converted to Kotlin.bzip2
parent
07bb22f795
commit
e5af454815
@ -1,34 +0,0 @@ |
|||||||
package dev.openrs2.asm.classpath; |
|
||||||
|
|
||||||
import java.util.Objects; |
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList; |
|
||||||
import dev.openrs2.asm.MemberDesc; |
|
||||||
|
|
||||||
public abstract class ClassMetadata { |
|
||||||
public abstract String getName(); |
|
||||||
public abstract boolean isDependency(); |
|
||||||
public abstract boolean isInterface(); |
|
||||||
public abstract ClassMetadata getSuperClass(); |
|
||||||
public abstract ImmutableList<ClassMetadata> getSuperInterfaces(); |
|
||||||
public abstract ImmutableList<MemberDesc> getFields(); |
|
||||||
public abstract ImmutableList<MemberDesc> getMethods(); |
|
||||||
public abstract boolean isNative(MemberDesc method); |
|
||||||
|
|
||||||
@Override |
|
||||||
public boolean equals(Object o) { |
|
||||||
if (this == o) { |
|
||||||
return true; |
|
||||||
} |
|
||||||
if (o == null || getClass() != o.getClass()) { |
|
||||||
return false; |
|
||||||
} |
|
||||||
var that = (ClassMetadata) o; |
|
||||||
return getName().equals(that.getName()); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public int hashCode() { |
|
||||||
return Objects.hash(getName()); |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,26 @@ |
|||||||
|
package dev.openrs2.asm.classpath |
||||||
|
|
||||||
|
import dev.openrs2.asm.MemberDesc |
||||||
|
|
||||||
|
abstract class ClassMetadata { |
||||||
|
abstract val name: String |
||||||
|
abstract val dependency: Boolean |
||||||
|
abstract val `interface`: Boolean |
||||||
|
abstract val superClass: ClassMetadata? |
||||||
|
abstract val superInterfaces: List<ClassMetadata> |
||||||
|
abstract val fields: List<MemberDesc> |
||||||
|
abstract val methods: List<MemberDesc> |
||||||
|
|
||||||
|
abstract fun isNative(method: MemberDesc): Boolean |
||||||
|
|
||||||
|
override fun equals(other: Any?): Boolean { |
||||||
|
if (this === other) return true |
||||||
|
if (other !is ClassMetadata) return false |
||||||
|
|
||||||
|
return name == other.name |
||||||
|
} |
||||||
|
|
||||||
|
override fun hashCode(): Int { |
||||||
|
return name.hashCode() |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue