Make DexParser.Id comparable

This commit is contained in:
LoveSy 2023-02-03 18:37:00 +08:00
parent 0c79601c49
commit fe81d95b0e
No known key found for this signature in database
1 changed files with 19 additions and 19 deletions

View File

@ -89,24 +89,10 @@ public interface DexParser extends Closeable {
@NonNull
StringId getName();
}
/**
* The interface Type id.
*/
interface TypeId {
/**
* Gets descriptor.
*
* @return the descriptor
*/
@NonNull
StringId getDescriptor();
}
/**
* The interface Id.
*/
interface Id {
interface Id<Self> extends Comparable<Self> {
/**
* Gets id.
*
@ -115,10 +101,24 @@ public interface DexParser extends Closeable {
int getId();
}
/**
* The interface Type id.
*/
interface TypeId extends Id<TypeId> {
/**
* Gets descriptor.
*
* @return the descriptor
*/
@NonNull
StringId getDescriptor();
}
/**
* The interface String id.
*/
interface StringId extends Id {
interface StringId extends Id<StringId> {
/**
* Gets string.
*
@ -131,7 +131,7 @@ public interface DexParser extends Closeable {
/**
* The interface Field id.
*/
interface FieldId extends Id {
interface FieldId extends Id<FieldId> {
/**
* Gets type.
*
@ -160,7 +160,7 @@ public interface DexParser extends Closeable {
/**
* The interface Method id.
*/
interface MethodId extends Id {
interface MethodId extends Id<MethodId> {
/**
* Gets declaring class.
*
@ -189,7 +189,7 @@ public interface DexParser extends Closeable {
/**
* The interface Proto id.
*/
interface ProtoId extends Id {
interface ProtoId extends Id<ProtoId> {
/**
* Gets shorty.
*