Skip to content

Commit

Permalink
Add some helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
teble committed Nov 29, 2023
1 parent 321c643 commit 9ef306c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dexkit/src/main/java/org/luckypray/dexkit/result/FieldData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ class FieldData private constructor(
*/
val className get() = dexField.className

/**
* field declaring class name
* ----------------
* 定义字段的类名
*/
val declaredClassName get() = className

/**
* field name
* ----------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ class MethodData private constructor(
*/
val className get() = dexMethod.className

/**
* method declaring class name
* ----------------
* 定义方法的类名
*/
val declaredClassName get() = className

/**
* method name
* ----------------
Expand Down
2 changes: 2 additions & 0 deletions dexkit/src/main/java/org/luckypray/dexkit/wrap/DexClass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class DexClass: Serializable {

val typeName: String

val className get() = typeName

val simpleName get() = typeName.substringAfterLast('.')

val isArray get() = typeName.endsWith("[]")
Expand Down
2 changes: 2 additions & 0 deletions dexkit/src/main/java/org/luckypray/dexkit/wrap/DexField.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class DexField: Serializable {
val name: String
val typeName: String

val declaredClassName get() = className

/**
* field type sign
* ----------------
Expand Down
2 changes: 2 additions & 0 deletions dexkit/src/main/java/org/luckypray/dexkit/wrap/DexMethod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class DexMethod: Serializable {
val paramTypeNames: List<String>
val returnTypeName: String

val declaredClassName get() = className

/**
* method sign
* ----------------
Expand Down

0 comments on commit 9ef306c

Please sign in to comment.