Uses of Class
java.lang.invoke.MethodType
-
Packages that use MethodType 软件包 描述 java.lang.invoke java.lang.invoke包包含由Java核心类库和虚拟机直接提供的动态语言支持。jdk.dynalink 包含用于链接invokedynamic呼叫站点的接口和类。jdk.dynalink.linker 包含语言运行时所需的接口和类,以实现自己的特定于语言的对象模型和类型转换。jdk.dynalink.linker.support 包含课程,使语言运行时更方便地实现自己的特定于语言的对象模型,并通过提供一些类的基本实现以及各种实用程序来类型转换。 -
-
Uses of MethodType in java.lang.invoke
Methods in java.lang.invoke that return MethodType Modifier and Type 方法 描述 MethodTypeVarHandle. accessModeType(VarHandle.AccessMode accessMode)获取此VarHandle和给定访问模式的访问模式类型。MethodTypeMethodType. appendParameterTypes(Class<?>... ptypesToInsert)查找或创建具有其他参数类型的方法类型。MethodTypeMethodType. appendParameterTypes(List<Class<?>> ptypesToInsert)查找或创建具有其他参数类型的方法类型。MethodTypeMethodType. changeParameterType(int num, Class<?> nptype)查找或创建具有单个不同参数类型的方法类型。MethodTypeMethodType. changeReturnType(Class<?> nrtype)查找或创建具有不同返回类型的方法类型。MethodTypeMethodType. dropParameterTypes(int start, int end)查找或创建一种省略某些参数类型的方法类型。MethodTypeMethodType. erase()删除所有引用类型到Object。static MethodTypeMethodType. fromMethodDescriptorString(String descriptor, ClassLoader loader)查找或创建方法类型的实例,给定其字节码描述符的拼写。MethodTypeMethodType. generic()将所有类型(参考和原始)转换为Object。static MethodTypeMethodType. genericMethodType(int objectArgCount)查找或创建一个方法类型,其组件全部为Object。static MethodTypeMethodType. genericMethodType(int objectArgCount, boolean finalArray)查找或创建一个方法类型,其组件为Object并具有可选的尾部Object[]数组。MethodTypeMethodHandleInfo. getMethodType()返回破解的符号引用的标称类型,表示为方法类型。MethodTypeMethodType. insertParameterTypes(int num, Class<?>... ptypesToInsert)查找或创建具有其他参数类型的方法类型。MethodTypeMethodType. insertParameterTypes(int num, List<Class<?>> ptypesToInsert)查找或创建具有其他参数类型的方法类型。static MethodTypeMethodType. methodType(Class<?> rtype)查找或创建具有给定组件的方法类型。static MethodTypeMethodType. methodType(Class<?> rtype, Class<?> ptype0)查找或创建具有给定组件的方法类型。static MethodTypeMethodType. methodType(Class<?> rtype, Class<?>[] ptypes)查找或创建给定方法类型的实例。static MethodTypeMethodType. methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes)查找或创建具有给定组件的方法类型。static MethodTypeMethodType. methodType(Class<?> rtype, MethodType ptypes)查找或创建具有给定组件的方法类型。static MethodTypeMethodType. methodType(Class<?> rtype, List<Class<?>> ptypes)查找或创建具有给定组件的方法类型。MethodTypeCallSite. type()返回此呼叫站点目标的类型。MethodTypeMethodHandle. type()报告此方法句柄的类型。MethodTypeMethodType. unwrap()将所有包装类型转换为相应的原始类型。MethodTypeMethodType. wrap()将所有原始类型转换为相应的包装类型。Methods in java.lang.invoke with parameters of type MethodType Modifier and Type 方法 描述 static CallSiteLambdaMetafactory. altMetafactory(MethodHandles.Lookup caller, String invokedName, MethodType invokedType, Object... args)通过委派给所提供的MethodHandle,在适当的类型适应和参数的部分评估之后,便于创建简单的“功能对象”,实现一个或多个接口。MethodHandleMethodHandle. asType(MethodType newType)生成一个适配器方法句柄,该句柄将当前方法句柄的类型适配为新类型。MethodHandleMethodHandles.Lookup. bind(Object receiver, String name, MethodType type)为非静态方法生成早期绑定的方法句柄。static MethodHandleMethodHandles. empty(MethodType type)产生一个忽略任何参数的请求类型的方法句柄,不执行任何操作,并根据返回类型返回合适的默认值。static MethodHandleMethodHandles. exactInvoker(MethodType type)产生一个特殊的 调用者方法句柄 ,可以用来调用给定类型的任何方法句柄,如同通过invokeExact一样 。static MethodHandleMethodHandles. explicitCastArguments(MethodHandle target, MethodType newType)生成方法句柄,通过成对参数和返回类型转换将给定方法句柄的类型适配为新类型。MethodHandleMethodHandles.Lookup. findConstructor(Class<?> refc, MethodType type)使用指定类型的构造函数生成创建对象并初始化它的方法句柄。MethodHandleMethodHandles.Lookup. findSpecial(Class<?> refc, String name, MethodType type, Class<?> specialCaller)为虚拟方法生成早期绑定的方法句柄。MethodHandleMethodHandles.Lookup. findStatic(Class<?> refc, String name, MethodType type)为静态方法生成方法句柄。MethodHandleMethodHandles.Lookup. findVirtual(Class<?> refc, String name, MethodType type)为虚拟方法生成方法句柄。static MethodHandleMethodHandles. invoker(MethodType type)产生一个特殊的 调用方法句柄 ,可以用于调用与给定类型兼容的任何方法句柄,如同通过invoke一样 。static CallSiteStringConcatFactory. makeConcat(MethodHandles.Lookup lookup, String name, MethodType concatType)促进创建优化的字符串连接方法,可以用于有效地连接已知数量的已知类型的参数,可能在类型适配和参数的部分评估之后。static CallSiteStringConcatFactory. makeConcatWithConstants(MethodHandles.Lookup lookup, String name, MethodType concatType, String recipe, Object... constants)促进创建优化的字符串连接方法,可以用于有效地连接已知数量的已知类型的参数,可能在类型适配和参数的部分评估之后。static CallSiteLambdaMetafactory. metafactory(MethodHandles.Lookup caller, String invokedName, MethodType invokedType, MethodType samMethodType, MethodHandle implMethod, MethodType instantiatedMethodType)通过委派给所提供的MethodHandle,在适当的类型适应和部分评估参数之后,便于创建简单的“功能对象”,实现一个或多个接口。static MethodTypeMethodType. methodType(Class<?> rtype, MethodType ptypes)查找或创建具有给定组件的方法类型。static MethodHandleMethodHandles. permuteArguments(MethodHandle target, MethodType newType, int... reorder)生成方法句柄,通过重新排序参数,将方法句柄调整到新类型的调用顺序。static MethodHandleMethodHandles. spreadInvoker(MethodType type, int leadingArgCount)产生一个方法句柄,它将调用给定的type任何方法句柄,给定数量的尾随参数被单个尾随的Object[]数组替换。static StringMethodHandleInfo. toString(int kind, Class<?> defc, String name, MethodType type)给出MethodHandleInfo的字符串表示,给出其符号引用的四个部分。static MethodHandleMethodHandles. varHandleExactInvoker(VarHandle.AccessMode accessMode, MethodType type)产生一个特殊的 调用者方法句柄 ,可以用于在任何与其给定类型相关联的访问模式类型的VarHandle上调用签名多态访问模式方法。static MethodHandleMethodHandles. varHandleInvoker(VarHandle.AccessMode accessMode, MethodType type)产生一个特殊的 调用者方法句柄 ,可以用于在任何与其给定类型相关联的访问模式类型的VarHandle上调用签名多态访问模式方法。Constructors in java.lang.invoke with parameters of type MethodType Constructor 描述 ConstantCallSite(MethodType targetType, MethodHandle createTargetHook)创建具有永久目标的呼叫站点,可能绑定到呼叫站点本身。MutableCallSite(MethodType type)使用给定的方法类型创建一个空白的调用站点对象。VolatileCallSite(MethodType type)创建一个具有对其目标的易失性绑定的调用站点。 -
Uses of MethodType in jdk.dynalink
Methods in jdk.dynalink that return MethodType Modifier and Type 方法 描述 MethodTypeCallSiteDescriptor. getMethodType()呼叫站点的方法类型。Methods in jdk.dynalink with parameters of type MethodType Modifier and Type 方法 描述 CallSiteDescriptorCallSiteDescriptor. changeMethodType(MethodType newMethodType)查找或创建仅在其描述符的方法类型中不同的调用站点描述符。protected CallSiteDescriptorCallSiteDescriptor. changeMethodTypeInternal(MethodType newMethodType)查找或创建仅在其描述符的方法类型中不同的调用站点描述符。Constructors in jdk.dynalink with parameters of type MethodType Constructor 描述 CallSiteDescriptor(MethodHandles.Lookup lookup, Operation operation, MethodType methodType)创建一个新的呼叫站点描述符。 -
Uses of MethodType in jdk.dynalink.linker
-
Uses of MethodType in jdk.dynalink.linker.support
Methods in jdk.dynalink.linker.support with parameters of type MethodType Modifier and Type 方法 描述 static MethodHandleGuards. asType(MethodHandle test, MethodType type)使用一个方法句柄,用来作为一个保护,并使其适应所请求的类型,但返回一个布尔值。static MethodHandleGuards. asType(LinkerServices linkerServices, MethodHandle test, MethodType type)使用一个方法句柄,用来作为一个保护,并使其适应所请求的类型,但返回一个布尔值。MethodHandleLookup. findSpecial(Class<?> declaringClass, String name, MethodType type)MethodHandleLookup. findStatic(Class<?> declaringClass, String name, MethodType type)MethodHandleLookup. findVirtual(Class<?> declaringClass, String name, MethodType type)static MethodHandleGuards. isArray(int pos, MethodType type)创建方法句柄,如果指定位置的参数是Java数组,则返回true。static MethodHandleGuards. isInstance(Class<?> clazz, int pos, MethodType type)使用指定类型的参数创建方法句柄,但使用布尔值返回值。static MethodHandleGuards. isInstance(Class<?> clazz, MethodType type)使用指定类型的参数创建方法句柄,但使用布尔值返回值。static MethodHandleGuards. isOfClass(Class<?> clazz, MethodType type)使用指定类型的参数创建一个保护方法句柄,但使用布尔返回值。
-