public interface ArrayType extends ReferenceType
ArrayReference
修飾子と型 | メソッドと説明 |
---|---|
String |
componentSignature()
この配列クラスの要素の JNI シグニチャーを取得します。
|
Type |
componentType()
この配列の宣言時に指定された要素の型を返します。
|
String |
componentTypeName()
この配列の要素の型のテキスト表現を返します。
|
ArrayReference |
newInstance(int length)
ターゲット VM 内のこの配列クラスの新しいインスタンスを生成します。
|
allFields, allLineLocations, allLineLocations, allMethods, availableStrata, classLoader, classObject, constantPool, constantPoolCount, defaultStratum, equals, failedToInitialize, fieldByName, fields, genericSignature, getValue, getValues, hashCode, instances, isAbstract, isFinal, isInitialized, isPrepared, isStatic, isVerified, locationsOfLine, locationsOfLine, majorVersion, methods, methodsByName, methodsByName, minorVersion, name, nestedTypes, sourceDebugExtension, sourceName, sourceNames, sourcePaths, visibleFields, visibleMethods
toString, virtualMachine
compareTo
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers
ArrayReference newInstance(int length)
length
- 新しい配列内の要素の数ArrayReference
。VMCannotBeModifiedException
- VirtualMachine が読み取り専用の場合 (VirtualMachine.canBeModified()
を参照)。String componentSignature()
String componentTypeName()
Type componentType() throws ClassNotLoadedException
注:配列の要素の型は必ず、配列よりも前に作成またはロードされます。詳細は、Java™ 仮想マシン仕様の配列クラスの作成に関するセクション 5.3.3 を参照してください。ただし、ロードされた要素の型はまだ準備されていない可能性があります。その場合、ロードされた型に対して、fields()
などの操作を実行しようとすると、ClassNotPreparedException
がスローされます。参照型の準備ができているかどうかを確認するには、ReferenceType.isPrepared()
を使用します。
Type
。ClassNotLoadedException
Type
, Field.type() - for usage examples
Copyright © 1999, 2013, Oracle and/or its affiliates. All rights reserved.