-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.yhs0602.vm.classloader | ||
|
||
import com.yhs0602.vm.MethodWrapper | ||
|
||
class ArrayType( | ||
val elementType: Type, | ||
clonableType: Type, | ||
serializableType: Type | ||
) : Type() { | ||
override val directSuperClass: Type = ObjectType // 모든 배열 타입의 슈퍼 클래스는 Object | ||
override val interfaces: List<Type> = listOf(clonableType, serializableType) // 배열이 구현하는 인터페이스 | ||
override val interfaceTable: Map<MethodTableEntry, MethodTableEntry> = emptyMap() | ||
override val virtualTable: Map<MethodTableEntry, MethodTableEntry> = emptyMap() | ||
override val descriptor: String = "[" + elementType.descriptor | ||
override val methods: Map<MethodTableEntry, MethodWrapper> = emptyMap() | ||
override val staticMethods: Map<MethodTableEntry, MethodWrapper> = emptyMap() | ||
override val constructors: Map<MethodTableEntry, MethodWrapper> = emptyMap() | ||
override val clazz: Class<*> = java.lang.reflect.Array.newInstance(elementType.clazz, 0).javaClass | ||
override fun callClInit() {} // 배열 타입은 clinit이 없음 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters