软件包 | 描述 |
---|---|
java.lang.invoke |
java.lang.invoke 包中包含的动态语言支持的java核心类库和虚拟机直接提供。
|
Modifier and Type | Method and Description |
---|---|
MethodType |
MethodType.appendParameterTypes(类<?>... ptypesToInsert)
查找或创建一个带有附加参数类型的方法类型。
|
MethodType |
MethodType.appendParameterTypes(List<类<?>> ptypesToInsert)
查找或创建一个带有附加参数类型的方法类型。
|
MethodType |
MethodType.changeParameterType(int num, 类<?> nptype)
查找或创建一个具有单个不同参数类型的方法类型。
|
MethodType |
MethodType.changeReturnType(类<?> nrtype)
查找或创建一个具有不同返回类型的方法类型。
|
MethodType |
MethodType.dropParameterTypes(int start, int end)
查找或创建一个具有一些参数类型的方法类型。
|
MethodType |
MethodType.erase()
清除所有引用类型
Object 。
|
static MethodType |
MethodType.fromMethodDescriptorString(String descriptor, ClassLoader loader)
寻找或创建一个方法类型的一个实例,给出了其字节码描述符的拼写。
|
MethodType |
MethodType.generic()
将所有类型,参考和原始,对
Object 。
|
static MethodType |
MethodType.genericMethodType(int objectArgCount)
寻找或创建一个方法类型的组件都
Object 。
|
static MethodType |
MethodType.genericMethodType(int objectArgCount, boolean finalArray)
寻找或创建一个方法类型的组件是一个可选的尾
Object[] 阵列
Object 。
|
MethodType |
MethodHandleInfo.getMethodType()
返回破解符号引用的符号类型,表示为方法类型。
|
MethodType |
MethodType.insertParameterTypes(int num, 类<?>... ptypesToInsert)
查找或创建一个带有附加参数类型的方法类型。
|
MethodType |
MethodType.insertParameterTypes(int num, List<类<?>> ptypesToInsert)
查找或创建一个带有附加参数类型的方法类型。
|
static MethodType |
MethodType.methodType(类<?> rtype)
查找或创建给定组件的方法类型。
|
static MethodType |
MethodType.methodType(类<?> rtype, 类<?> ptype0)
查找或创建给定组件的方法类型。
|
static MethodType |
MethodType.methodType(类<?> rtype, 类<?>[] ptypes)
查找或创建给定方法类型的实例。
|
static MethodType |
MethodType.methodType(类<?> rtype, 类<?> ptype0, 类<?>... ptypes)
查找或创建给定组件的方法类型。
|
static MethodType |
MethodType.methodType(类<?> rtype, List<类<?>> ptypes)
查找或创建给定组件的方法类型。
|
static MethodType |
MethodType.methodType(类<?> rtype, MethodType ptypes)
查找或创建给定组件的方法类型。
|
MethodType |
MethodHandle.type()
报告该方法句柄的类型。
|
MethodType |
CallSite.type()
返回此调用站点的目标的类型。
|
MethodType |
MethodType.unwrap()
将所有的包装类型转换为其相应的原始类型。
|
MethodType |
MethodType.wrap()
将所有的原始类型转换为它们的相应的包装器类型。
|
Modifier and Type | Method and Description |
---|---|
static CallSite |
LambdaMetafactory.altMetafactory(MethodHandles.Lookup caller, String invokedName, MethodType invokedType, Object... args)
方便简单的“对象”,实现由一个或多个接口,一个代表团提供
MethodHandle 创作,经过适当的类型的适应和部分论据评价。
|
MethodHandle |
MethodHandle.asType(MethodType newType)
产生一个适应当前方法句柄类型的适配器方法句柄,以适应一个新类型。
|
MethodHandle |
MethodHandles.Lookup.bind(Object receiver, String name, MethodType type)
用于非静态方法的早期绑定方法句柄。
|
static MethodHandle |
MethodHandles.exactInvoker(MethodType type)
产生了一种特殊的调用方法处理可用于调用任何方法处理给定类型的,如
invokeExact 。
|
static MethodHandle |
MethodHandles.explicitCastArguments(MethodHandle target, MethodType newType)
通过成对的参数和返回类型转换,生成一个适应给定方法句柄类型的方法句柄。
|
MethodHandle |
MethodHandles.Lookup.findConstructor(类<?> refc, MethodType type)
产生的方法处理,创建一个对象并将它初始化,使用指定类型的构造函数。
|
MethodHandle |
MethodHandles.Lookup.findSpecial(类<?> refc, String name, MethodType type, 类<?> specialCaller)
为一个虚拟方法产生早期绑定的方法句柄。
|
MethodHandle |
MethodHandles.Lookup.findStatic(类<?> refc, String name, MethodType type)
用于静态方法的方法处理。
|
MethodHandle |
MethodHandles.Lookup.findVirtual(类<?> refc, String name, MethodType type)
产生一个虚拟方法的方法句柄。
|
static MethodHandle |
MethodHandles.invoker(MethodType type)
产生了一种特殊的调用方法处理可用于调用任何方法处理符合给定的类型,如
invoke 。
|
static CallSite |
LambdaMetafactory.metafactory(MethodHandles.Lookup caller, String invokedName, MethodType invokedType, MethodType samMethodType, MethodHandle implMethod, MethodType instantiatedMethodType)
方便简单的“对象”,实现由一个或多个接口,一个代表团提供
MethodHandle 创作,经过适当的类型的适应和部分论据评价。
|
static MethodType |
MethodType.methodType(类<?> rtype, MethodType ptypes)
查找或创建给定组件的方法类型。
|
static MethodHandle |
MethodHandles.permuteArguments(MethodHandle target, MethodType newType, int... reorder)
生产法处理适应给定的方法的调用顺序处理一个新的类型,通过重新排列参数。
|
static MethodHandle |
MethodHandles.spreadInvoker(MethodType type, int leadingArgCount)
产生的方法处理这将调用任何方法处理给定的
type ,与给定数量的尾参数由一个单一的尾
Object[] 阵列取代。
|
static String |
MethodHandleInfo.toString(int kind, 类<?> defc, String name, MethodType type)
返回一个
MethodHandleInfo 字符串表示,鉴于其象征意义四部分。
|
Constructor and Description |
---|
ConstantCallSite(MethodType targetType, MethodHandle createTargetHook)
创建一个具有永久目标的调用站点,可能绑定到调用站点本身。
|
MutableCallSite(MethodType type)
用给定的方法类型创建一个空白调用站点对象。
|
VolatileCallSite(MethodType type)
创建一个与目标绑定的调用站点。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.