インタフェースjava.lang.constant.ClassDescの
使用
ClassDescを使用するパッケージ
パッケージ
説明
Javaプログラミング言語の設計にあたり基本的なクラスを提供します。
クラス・ファイルの解析、生成および変換ライブラリを提供します。
java.lang.classfilePREVIEWライブラリのクラス・ファイル属性を記述するインタフェースを提供します。java.lang.classfilePREVIEWライブラリ上に構築された特定のコンポーネント、変換およびツールを提供します。java.lang.classfilePREVIEWライブラリのクラス・ファイル定数プール・エントリを記述するインタフェースを提供します。java.lang.classfilePREVIEWライブラリのコード命令を記述するインタフェースを提供します。クラスやメソッド・ハンドルなどのランタイム・エンティティ用に「名目記述子」を表すクラスおよびインタフェース、および定数プール・エントリや
invokedynamicコール・サイトなどのクラス・ファイル・エンティティ用に「名目記述子」を表すクラスおよびインタフェース。java.lang.invokeパッケージは、Java Virtual Machineとやりとりするための低レベルのプリミティブを提供します。-
java.langでのClassDescの使用
-
java.lang.classfilePREVIEWでのClassDescの使用
修飾子と型メソッド説明default ClassDescSignature.ClassTypeSig.classDesc()クラス名をシンボリック記述子として返します。default ClassDescAnnotation.classSymbol()注釈のクラスをシンボリック記述子として返します。default ClassDescAnnotationValue.OfClass.classSymbol()クラス・シンボルを返します。default ClassDescAnnotationValue.OfEnum.classSymbol()列挙クラス記号を返します。default ClassDescFieldModel.fieldTypeSymbol()このフィールドのフィールド記述子をシンボリック記述子として返します。ClassDesc型のパラメータを持つjava.lang.classfilePREVIEWのメソッド修飾子と型メソッド説明default CodeBuilderPREVIEW新しい参照配列を作成する命令を生成しますdefault byte[]ClassFile.build(ClassDesc thisClass, Consumer<? super ClassBuilderPREVIEW> handler) クラス・ファイルをバイト配列に作成します。default voidクラス・ファイルをファイルに作成します。CodeBuilder.CatchBuilder.catching(ClassDesc exceptionType, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler) 指定された型の例外を捕捉するcatchブロックを追加します。default CodeBuilderPREVIEWオブジェクトが指定されたタイプかどうかをチェックする命令を生成しますdefault CodeBuilderPREVIEWCodeBuilder.exceptionCatch(LabelPREVIEW start, LabelPREVIEW end, LabelPREVIEW handler, ClassDesc catchType) 例外表エントリの宣言default CodeBuilderPREVIEWフィールドにアクセスするための指示の生成ClassHierarchyResolver.getClassInfo(ClassDesc classDesc) 指定されたクラス名のClassHierarchyResolver.ClassHierarchyInfoPREVIEWを返します。リゾルバで名前が不明な場合はnullを返します。default CodeBuilderPREVIEWオブジェクトからフィールドをフェッチする命令の生成default CodeBuilderPREVIEWクラスから静的フィールドを取得する命令を生成しますdefault CodeBuilderPREVIEWCodeBuilder.instanceOf(ClassDesc target) オブジェクトが指定されたタイプであるかどうかを判断するための命令を生成します。default CodeBuilderPREVIEWCodeBuilder.invoke(OpcodePREVIEW opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) メソッドまたはコンストラクタを呼び出す命令の生成default CodeBuilderPREVIEWCodeBuilder.invokeinterface(ClassDesc owner, String name, MethodTypeDesc type) インタフェース・メソッドを起動する命令の生成default CodeBuilderPREVIEWCodeBuilder.invokespecial(ClassDesc owner, String name, MethodTypeDesc type) インスタンス・メソッドを起動する命令を生成します。現在のクラスとそのスーパータイプのインスタンス初期化メソッドとメソッドを直接起動します。default CodeBuilderPREVIEWCodeBuilder.invokespecial(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) インスタンス・メソッドを起動する命令を生成します。現在のクラスとそのスーパータイプのインスタンス初期化メソッドとメソッドを直接起動します。default CodeBuilderPREVIEWCodeBuilder.invokestatic(ClassDesc owner, String name, MethodTypeDesc type) クラス(static)メソッドを起動する命令を生成します。default CodeBuilderPREVIEWCodeBuilder.invokestatic(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) クラス(static)メソッドを起動する命令を生成します。default CodeBuilderPREVIEWCodeBuilder.invokevirtual(ClassDesc owner, String name, MethodTypeDesc type) インスタンス・メソッドを起動する命令を生成します。クラスに基づいてディスパッチします。default CodeBuilderPREVIEWCodeBuilder.localVariable(int slot, String name, ClassDesc descriptor, LabelPREVIEW startScope, LabelPREVIEW endScope) ローカル変数エントリを宣言しますdefault CodeBuilderPREVIEWCodeBuilder.multianewarray(ClassDesc array, int dims) 新しい多次元配列を作成する命令の生成default CodeBuilderPREVIEW新規オブジェクトを作成する命令の生成static AnnotationPREVIEWAnnotation.of(ClassDesc annotationClass, AnnotationElementPREVIEW... elements) 注釈を返します。static AnnotationPREVIEWAnnotation.of(ClassDesc annotationClass, List<AnnotationElementPREVIEW> elements) 注釈を返します。static Signature.BaseTypeSigPREVIEWプリミティブ型またはvoidのシグネチャを返します。Signature.ClassTypeSig.of(Signature.ClassTypeSigPREVIEW outerType, ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) 内部クラスのクラス型シグネチャを返します。Signature.ClassTypeSig.of(ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) クラス・タイプのシグネチャを返します。Javaタイプのシグネチャを返します。static TypeAnnotationPREVIEWTypeAnnotation.of(TypeAnnotation.TargetInfoPREVIEW targetInfo, List<TypeAnnotation.TypePathComponentPREVIEW> targetPath, ClassDesc annotationClass, AnnotationElementPREVIEW... annotationElements) 型注釈を返します。static TypeAnnotationPREVIEWTypeAnnotation.of(TypeAnnotation.TargetInfoPREVIEW targetInfo, List<TypeAnnotation.TypePathComponentPREVIEW> targetPath, ClassDesc annotationClass, List<AnnotationElementPREVIEW> annotationElements) 型注釈を返します。static AnnotationElementPREVIEWclass-valued注釈の注釈キーと値のペアを返します。class-valued要素の注釈要素を返します。クラスが特定のスーパークラスを持つ宣言クラスであることを示します。enum-valued要素の注釈要素を返します。static InterfacesPREVIEWInterfacesPREVIEW要素を返します。default CodeBuilderPREVIEWオブジェクトにフィールドを設定する指示の生成default CodeBuilderPREVIEWクラスの静的フィールドを設定する命令を生成します。default byte[]ClassFile.transform(ClassModelPREVIEW model, ClassDesc newClassName, ClassTransformPREVIEW transform) ClassTransformPREVIEWを使用して、1つのクラス・ファイルを新しいクラス・ファイルに変換します。default ClassBuilderPREVIEWフィールドを追加しますdefault ClassBuilderPREVIEWClassBuilder.withField(String name, ClassDesc descriptor, Consumer<? super FieldBuilderPREVIEW> handler) フィールドを追加しますdefault ClassBuilderPREVIEWClassBuilder.withInterfaceSymbols(ClassDesc... interfaces) このクラスのインタフェースを設定します。default ClassBuilderPREVIEWClassBuilder.withSuperclass(ClassDesc desc) このクラスのスーパークラスを設定します。ClassDesc型の型引数を持つjava.lang.classfilePREVIEWのメソッド・パラメータ修飾子と型メソッド説明default ClassHierarchyResolverPREVIEWClassHierarchyResolver.cached(Supplier<Map<ClassDesc, ClassHierarchyResolver.ClassHierarchyInfoPREVIEW>> cacheFactory) このリゾルバからクラス階層情報をキャッシュするClassHierarchyResolverを返します。CodeBuilder.CatchBuilder.catchingMulti(List<ClassDesc> exceptionTypes, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler) 指定された型の例外を捕捉するcatchブロックを追加します。ClassHierarchyResolver.of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) クラス階層メタデータのコレクションからクラス階層情報を抽出するClassHierarchyResolverPREVIEWを返しますClassHierarchyResolver.of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) クラス階層メタデータのコレクションからクラス階層情報を抽出するClassHierarchyResolverPREVIEWを返しますClassHierarchyResolver.of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) クラス階層メタデータのコレクションからクラス階層情報を抽出するClassHierarchyResolverPREVIEWを返しますClassHierarchyResolver.ofResourceParsing(Function<ClassDesc, InputStream> classStreamResolver) マッピング関数によって配置されたクラス・ファイルからクラス階層情報を抽出するClassHierarchyResolverPREVIEWを返します。static InterfacesPREVIEWInterfacesPREVIEW要素を返します。default ClassBuilderPREVIEWClassBuilder.withInterfaceSymbols(List<ClassDesc> interfaces) このクラスのインタフェースを設定します。 -
java.lang.classfile.attributePREVIEWでのClassDescの使用
修飾子と型メソッド説明default ClassDescStackMapFrameInfo.ObjectVerificationTypeInfo.classSymbol()オブジェクトのクラスを返します。default ClassDescRecordComponentInfo.descriptorSymbol()このコンポーネントのフィールド記述子をClassDescとして返します。default ClassDescLocalVariableInfo.typeSymbol()ローカル変数のフィールド記述子を返します。ClassDesc型のパラメータを持つjava.lang.classfile.attributePREVIEWのメソッド修飾子と型メソッド説明EnclosingMethodAttribute.of(ClassDesc className, Optional<String> methodName, Optional<MethodTypeDesc> methodType) EnclosingMethod属性を返します。static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags) 内部クラスの説明を返します。static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags) 内部クラスの説明を返します。ModuleMainClass属性を返します。static ModuleProvideInfoPREVIEWサービス・プロビジョニングの説明を返します。static ModuleProvideInfoPREVIEWサービス・プロビジョニングの説明を返します。static NestHostAttributePREVIEWNestHost属性を返します。static RecordComponentInfoPREVIEWレコード・コンポーネントの説明を返します。static RecordComponentInfoPREVIEWレコード・コンポーネントの説明を返します。新しいオブジェクト検証タイプ情報を返します。static ExceptionsAttributePREVIEWExceptions属性を返します。static NestMembersAttributePREVIEWNestMembers属性を返します。PermittedSubclasses属性を返します。サービスの提供を宣言します。サービスの使用を宣言します。ClassDesc型の型引数を持つjava.lang.classfile.attributePREVIEWのメソッド・パラメータ修飾子と型メソッド説明static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags) 内部クラスの説明を返します。static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags) 内部クラスの説明を返します。static ModuleProvideInfoPREVIEWサービス・プロビジョニングの説明を返します。static ExceptionsAttributePREVIEWExceptions属性を返します。static NestMembersAttributePREVIEWNestMembers属性を返します。PermittedSubclasses属性を返します。 -
java.lang.classfile.componentsPREVIEWでのClassDescの使用
ClassDesc型のパラメータを持つjava.lang.classfile.componentsPREVIEWのメソッドClassDesc型の型引数を持つjava.lang.classfile.componentsPREVIEWのメソッド・パラメータ修飾子と型メソッド説明static ClassRemapperPREVIEWマップ関数で指示されたClassRemapperの新しいインスタンスを作成します。static ClassRemapperPREVIEWマップ関数で指示されたClassRemapperの新しいインスタンスを作成します。static ClassRemapperPREVIEWクラス・マップで指示されたClassRemapperの新しいインスタンスを作成します。static ClassRemapperPREVIEWクラス・マップで指示されたClassRemapperの新しいインスタンスを作成します。 -
java.lang.classfile.constantpoolPREVIEWでのClassDescの使用
修飾子と型メソッド説明ClassEntry.asSymbol()クラス名をシンボリック記述子として返します。default ClassDescConstantDynamicEntry.typeSymbol()動的定数の型のシンボリック記述子を返します。default ClassDescFieldRefEntry.typeSymbol()フィールドの型のシンボリック記述子を返します。ClassDesc型のパラメータを持つjava.lang.classfile.constantpoolPREVIEWのメソッド修飾子と型メソッド説明default ClassEntryPREVIEWConstantPoolBuilder.classEntry(ClassDesc classDesc) 指定されたClassDescで説明されているクラスを記述するClassEntryPREVIEWを返します。default FieldRefEntryPREVIEWConstantPoolBuilder.fieldRefEntry(ClassDesc owner, String name, ClassDesc type) クラスのフィールドを記述するFieldRefEntryPREVIEWを返します。default InterfaceMethodRefEntryPREVIEWConstantPoolBuilder.interfaceMethodRefEntry(ClassDesc owner, String name, MethodTypeDesc type) クラスのメソッドを記述するInterfaceMethodRefEntryPREVIEWを返します。default MethodRefEntryPREVIEWConstantPoolBuilder.methodRefEntry(ClassDesc owner, String name, MethodTypeDesc type) クラスのメソッドを記述するMethodRefEntryPREVIEWを返します。default NameAndTypeEntryPREVIEWConstantPoolBuilder.nameAndTypeEntry(String name, ClassDesc type) 指定された名前と型を記述するNameAndTypeEntryPREVIEWを返します。 -
java.lang.classfile.instructionPREVIEWでのClassDescの使用
修飾子と型メソッド説明default ClassDescFieldInstruction.typeSymbol()フィールドの型のシンボリック記述子を返します。default ClassDescLocalVariable.typeSymbol()ローカル変数型をシンボリック記述子として返します。ClassDesc型のパラメータを持つjava.lang.classfile.instructionPREVIEWのメソッド -
java.lang.constantでのClassDescの使用
java.lang.constantにClassDesc型の引数型を持つサブインタフェース修飾子と型インタフェース説明interfaceinterfaceClassDescとして宣言されたjava.lang.constantのフィールド修飾子と型フィールド説明static final ClassDescConstantDescs.CD_booleanプリミティブ・タイプbooleanを表すClassDescstatic final ClassDescConstantDescs.CD_Booleanstatic final ClassDescConstantDescs.CD_byteプリミティブ・タイプbyteを表すClassDescstatic final ClassDescConstantDescs.CD_Bytestatic final ClassDescConstantDescs.CD_CallSitestatic final ClassDescConstantDescs.CD_charプリミティブ・タイプcharを表すClassDescstatic final ClassDescConstantDescs.CD_Characterstatic final ClassDescConstantDescs.CD_Classstatic final ClassDescConstantDescs.CD_ClassDescstatic final ClassDescConstantDescs.CD_Collectionstatic final ClassDescConstantDescs.CD_ConstantBootstrapsstatic final ClassDescConstantDescs.CD_ConstantDescstatic final ClassDescConstantDescs.CD_DirectMethodHandleDescstatic final ClassDescConstantDescs.CD_doubleプリミティブ・タイプdoubleを表すClassDescstatic final ClassDescConstantDescs.CD_Doublestatic final ClassDescConstantDescs.CD_DynamicCallSiteDescstatic final ClassDescConstantDescs.CD_DynamicConstantDescstatic final ClassDescConstantDescs.CD_Enumstatic final ClassDescConstantDescs.CD_EnumDescstatic final ClassDescConstantDescs.CD_Exceptionstatic final ClassDescConstantDescs.CD_floatプリミティブ・タイプfloatを表すClassDescstatic final ClassDescConstantDescs.CD_Floatstatic final ClassDescConstantDescs.CD_intプリミティブ・タイプintを表すClassDescstatic final ClassDescConstantDescs.CD_Integerstatic final ClassDescConstantDescs.CD_Liststatic final ClassDescConstantDescs.CD_longプリミティブ・タイプlongを表すClassDescstatic final ClassDescConstantDescs.CD_Longstatic final ClassDescConstantDescs.CD_Mapstatic final ClassDescConstantDescs.CD_MethodHandlestatic final ClassDescConstantDescs.CD_MethodHandleDescstatic final ClassDescConstantDescs.CD_MethodHandleDesc_Kindstatic final ClassDescConstantDescs.CD_MethodHandlesstatic final ClassDescConstantDescs.CD_MethodHandles_Lookupstatic final ClassDescConstantDescs.CD_MethodTypestatic final ClassDescConstantDescs.CD_MethodTypeDescstatic final ClassDescConstantDescs.CD_Numberstatic final ClassDescConstantDescs.CD_Objectstatic final ClassDescConstantDescs.CD_Setstatic final ClassDescConstantDescs.CD_shortプリミティブ・タイプshortを表すClassDescstatic final ClassDescConstantDescs.CD_Shortstatic final ClassDescConstantDescs.CD_Stringstatic final ClassDescConstantDescs.CD_Throwablestatic final ClassDescConstantDescs.CD_VarHandlestatic final ClassDescConstantDescs.CD_VarHandleDescstatic final ClassDescConstantDescs.CD_voidプリミティブ・タイプvoidを表すClassDescstatic final ClassDescConstantDescs.CD_VoidClassDescを返すjava.lang.constantのメソッド修飾子と型メソッド説明default ClassDescClassDesc.arrayType()default ClassDescClassDesc.arrayType(int rank) default ClassDescClassDesc.componentType()配列型を説明する場合はこのClassDescのコンポーネント型を返し、そうでない場合はnullを返します。DynamicConstantDesc.constantType()この定数に対してLDCのNameAndTypeオペランドに表示される型を示すClassDescを返します。default ClassDescdefault ClassDescstatic ClassDescクラスまたはインタフェース型に対して、"java.lang.String"などのクラスまたはインタフェースの名前を指定してClassDescを返します。static ClassDescクラスまたはインタフェース・タイプに対してClassDescを返します。クラスまたはインタフェースのパッケージ名および未修飾(simple)名が指定されます。static ClassDescClassDesc.ofDescriptor(String descriptor) クラス、インタフェース、配列またはプリミティブ・タイプの記述子文字列に対してClassDescを指定します。static ClassDescClassDesc.ofInternalName(String name) "java/lang/String"などの内部形式のクラスまたはインタフェースの名前を指定して、クラスまたはインタフェース・タイプのClassDescを返します。DirectMethodHandleDesc.owner()この名目記述子で説明するメソッドまたはフィールドを宣言するClassDescを返します。MethodTypeDesc.parameterArray()配列としてパラメータ型を返します。MethodTypeDesc.parameterType(int index) このMethodTypeDescで説明するメソッド・タイプのindex番目のパラメータのパラメータ・タイプを返します。MethodTypeDesc.returnType()MethodTypeDescで記述されたメソッド・タイプの戻り型を取得します。型ClassDescの引数を持つ型を返すjava.lang.constantのメソッド型ClassDescのパラメータを持つjava.lang.constantのメソッド修飾子と型メソッド説明MethodTypeDesc.changeParameterType(int index, ClassDesc paramType) このタイプと同一のMethodTypeDescを返します。ただし、指定されたタイプに変更されたパラメータ・タイプは1つのみです。MethodTypeDesc.changeReturnType(ClassDesc returnType) 指定された戻り型を除き、これと同一のMethodTypeDescを返します。MethodTypeDesc.insertParameterTypes(int pos, ClassDesc... paramTypes) このパラメータ・タイプが追加されたことを除き、同じMethodTypeDescを返します。static DirectMethodHandleDescMethodHandleDesc.of(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, String lookupDescriptor) 宣言されたメソッドの呼出し、コンストラクタの呼出し、またはフィールドへのアクセスに対応するMethodHandleDescを作成します。static MethodTypeDesc指定された戻り型およびパラメータ型のないMethodTypeDescを返します。static MethodTypeDesc戻り型およびパラメータ型が指定されたMethodTypeDescを返します。static MethodTypeDesc戻り型およびパラメータ・タイプのリストが指定されたMethodTypeDescを返します。static DirectMethodHandleDescConstantDescs.ofCallsiteBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes) invokedynamic呼出しサイトのブートストラップ・メソッドに対応するMethodHandleDescを返します。これは先頭のパラメータ・タイプがLookup、String、MethodTypeである静的メソッドです。static <T> ConstantDescDynamicConstantDesc.ofCanonical(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs) 定数ブートストラップが既知の単一記述子で、より具体的な記述子タイプ(例: ClassDesc)が使用可能な場合は、動的定数の名目記述子を返し、より具体的な型に変換します。static DirectMethodHandleDescConstantDescs.ofConstantBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes) 動的定数に対するブートストラップ・メソッドに対応するMethodHandleDescを返します。これは先行引数がLookup、String、Classであるstaticメソッドです。static DirectMethodHandleDescMethodHandleDesc.ofConstructor(ClassDesc owner, ClassDesc... paramTypes) コンストラクタの呼出しに対応するMethodHandleDescを返しますstatic DirectMethodHandleDescMethodHandleDesc.ofField(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String fieldName, ClassDesc fieldType) フィールドにアクセスするメソッド・ハンドルに対応するMethodHandleDescを作成します。static DirectMethodHandleDescMethodHandleDesc.ofMethod(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, MethodTypeDesc lookupMethodType) 宣言されたメソッドまたはコンストラクタの呼出しに対応するMethodHandleDescを作成します。static <T> DynamicConstantDesc<T> DynamicConstantDesc.ofNamed(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) 動的定数の名目記述子を返します。型ClassDescの型引数を持つjava.lang.constantのメソッド・パラメータ型ClassDescのパラメータを持つjava.lang.constantのコンストラクタ修飾子コンストラクタ説明protectedDynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) 動的定数の名目記述子を作成します。 -
java.lang.invokeでのClassDescの使用
ClassDescを返すjava.lang.invokeのメソッド型ClassDescのパラメータを持つjava.lang.invokeのメソッド修飾子と型メソッド説明static VarHandle.VarHandleDesc配列型のVarHandleに対応するVarHandle.VarHandleDescを返します。static VarHandle.VarHandleDescインスタンス・フィールドについて、VarHandleに対応するVarHandle.VarHandleDescを返します。static VarHandle.VarHandleDescVarHandle.VarHandleDesc.ofStaticField(ClassDesc declaringClass, String name, ClassDesc fieldType) 静的フィールドについてVarHandleに対応するVarHandle.VarHandleDescを返します。