Uses of Interface
java.lang.constant.MethodTypeDesc
Package
Description
Provides classfile parsing, generation, and transformation library.
Provides interfaces describing classfile attributes for the
java.lang.classfile
PREVIEW library.Provides specific components, transformations, and tools built on top of the
java.lang.classfile
PREVIEW library.Provides interfaces describing classfile constant pool entries for the
java.lang.classfile
PREVIEW library.Provides interfaces describing code instructions for the
java.lang.classfile
PREVIEW library.Classes and interfaces to represent nominal descriptors for run-time
entities such as classes or method handles, and classfile entities such as
constant pool entries or
invokedynamic
call sites.The
java.lang.invoke
package provides low-level primitives for interacting
with the Java Virtual Machine.-
Uses of MethodTypeDesc in java.lang.classfilePREVIEW
Modifier and TypeMethodDescriptiondefault MethodTypeDesc
MethodModel.methodTypeSymbol()
Returns the method descriptor of this method, as a symbolic descriptor.Modifier and TypeMethodDescriptiondefault CodeBuilderPREVIEW
CodeBuilder.invokeInstruction
(OpcodePREVIEW opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) Generate an instruction to invoke a method or constructordefault CodeBuilderPREVIEW
CodeBuilder.invokeinterface
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an interface methoddefault CodeBuilderPREVIEW
CodeBuilder.invokespecial
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEW
CodeBuilder.invokespecial
(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEW
CodeBuilder.invokestatic
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEW
CodeBuilder.invokestatic
(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEW
CodeBuilder.invokevirtual
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an instance method; dispatch based on classstatic MethodSignaturePREVIEW
MethodSignature.of
(MethodTypeDesc methodDescriptor) Returns a method signature for a raw (no generic information) method descriptor.default ClassBuilderPREVIEW
ClassBuilder.withMethod
(String name, MethodTypeDesc descriptor, int methodFlags, Consumer<? super MethodBuilderPREVIEW> handler) Adds a method.default ClassBuilderPREVIEW
ClassBuilder.withMethodBody
(String name, MethodTypeDesc descriptor, int methodFlags, Consumer<? super CodeBuilderPREVIEW> handler) Adds a method, with only aCodeAttribute
PREVIEW. -
Uses of MethodTypeDesc in java.lang.classfile.attributePREVIEW
Modifier and TypeMethodDescriptiondefault Optional
<MethodTypeDesc> EnclosingMethodAttribute.enclosingMethodTypeSymbol()
Returns the type of the enclosing method, if the class is immediately enclosed by a method or constructor. -
Uses of MethodTypeDesc in java.lang.classfile.componentsPREVIEW
Modifier and TypeMethodDescriptionstatic CodeLocalsShifterPREVIEW
CodeLocalsShifter.of
(AccessFlagsPREVIEW methodFlags, MethodTypeDesc methodDescriptor) Creates a new instance ofCodeLocalsShifter
PREVIEW with fixed local slots calculated from provided method information. -
Uses of MethodTypeDesc in java.lang.classfile.constantpoolPREVIEW
Modifier and TypeMethodDescriptionMethodTypeEntry.asSymbol()
Returns a symbolic descriptor for the method type.default MethodTypeDesc
InterfaceMethodRefEntry.typeSymbol()
Returns a symbolic descriptor for the interface method's type.default MethodTypeDesc
InvokeDynamicEntry.typeSymbol()
Returns a symbolic descriptor for the call site's invocation type.default MethodTypeDesc
MethodRefEntry.typeSymbol()
Returns a symbolic descriptor for the method's type.Modifier and TypeMethodDescriptiondefault InterfaceMethodRefEntryPREVIEW
ConstantPoolBuilder.interfaceMethodRefEntry
(ClassDesc owner, String name, MethodTypeDesc type) Returns AInterfaceMethodRefEntry
PREVIEW describing a method of a class.default MethodRefEntryPREVIEW
ConstantPoolBuilder.methodRefEntry
(ClassDesc owner, String name, MethodTypeDesc type) Returns AMethodRefEntry
PREVIEW describing a method of a class.ConstantPoolBuilder.methodTypeEntry
(MethodTypeDesc descriptor) Returns AMethodTypeEntry
PREVIEW describing a method type.default NameAndTypeEntryPREVIEW
ConstantPoolBuilder.nameAndTypeEntry
(String name, MethodTypeDesc type) Returns ANameAndTypeEntry
PREVIEW describing the provided name and type.ConstantPoolBuilder.utf8Entry
(MethodTypeDesc desc) -
Uses of MethodTypeDesc in java.lang.classfile.instructionPREVIEW
Modifier and TypeMethodDescriptiondefault MethodTypeDesc
InvokeDynamicInstruction.typeSymbol()
Returns the invocation type of the call site, as a symbolic descriptor.default MethodTypeDesc
InvokeInstruction.typeSymbol()
Returns a symbolic descriptor for the method type. -
Uses of MethodTypeDesc in java.lang.constant
Modifier and TypeFieldDescriptionstatic final MethodTypeDesc
ConstantDescs.MTD_void
Nominal descriptor representing the method descriptor()V
, taking no argument and returningvoid
.Modifier and TypeMethodDescriptionMethodTypeDesc.changeParameterType
(int index, ClassDesc paramType) Returns a MethodTypeDesc that is identical to this one, except that a single parameter type has been changed to the specified type.MethodTypeDesc.changeReturnType
(ClassDesc returnType) Returns a MethodTypeDesc that is identical to this one, except with the specified return type.MethodTypeDesc.dropParameterTypes
(int start, int end) Returns a MethodTypeDesc that is identical to this one, except that a range of parameter types have been removed.MethodTypeDesc.insertParameterTypes
(int pos, ClassDesc... paramTypes) Returns a MethodTypeDesc that is identical to this one, except that a range of additional parameter types have been inserted.DynamicCallSiteDesc.invocationType()
Returns aMethodTypeDesc
describing the invocation type that would appear in theNameAndType
operand of theinvokedynamic
.MethodHandleDesc.invocationType()
Returns aMethodTypeDesc
describing the invocation type of the method handle described by this nominal descriptor.static MethodTypeDesc
Returns a MethodTypeDesc with the given return type and no parameter types.static MethodTypeDesc
Returns a MethodTypeDesc given the return type and parameter types.static MethodTypeDesc
Returns a MethodTypeDesc given the return type and a list of parameter types.static MethodTypeDesc
MethodTypeDesc.ofDescriptor
(String descriptor) Creates a MethodTypeDesc given a method descriptor string.Modifier and TypeMethodDescriptiondefault MethodHandleDesc
MethodHandleDesc.asType
(MethodTypeDesc type) Returns a MethodHandleDesc that describes this method handle adapted to a different type, as if byMethodHandle.asType(MethodType)
.static DynamicCallSiteDesc
DynamicCallSiteDesc.of
(DirectMethodHandleDesc bootstrapMethod, MethodTypeDesc invocationType) Creates a nominal descriptor for aninvokedynamic
call site whose bootstrap method has no static arguments and for which the name parameter isConstantDescs.DEFAULT_NAME
.static DynamicCallSiteDesc
DynamicCallSiteDesc.of
(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType) Creates a nominal descriptor for aninvokedynamic
call site whose bootstrap method has no static arguments.static DynamicCallSiteDesc
DynamicCallSiteDesc.of
(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType, ConstantDesc... bootstrapArgs) Creates a nominal descriptor for aninvokedynamic
call site.static DirectMethodHandleDesc
MethodHandleDesc.ofMethod
(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, MethodTypeDesc lookupMethodType) Creates a MethodHandleDesc corresponding to an invocation of a declared method or constructor.DynamicCallSiteDesc.withNameAndType
(String invocationName, MethodTypeDesc invocationType) Returns a nominal descriptor for aninvokedynamic
call site whose bootstrap and bootstrap arguments are the same as this one, but with the specified invocationName and invocation invocationType -
Uses of MethodTypeDesc in java.lang.invoke
Modifier and TypeMethodDescriptionMethodType.describeConstable()
Returns a nominal descriptor for this instance, if one can be constructed, or an emptyOptional
if one cannot be.