当前位置: 首页>>代码示例>>Java>>正文


Java BootstrapMethodEntry类代码示例

本文整理汇总了Java中com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry的典型用法代码示例。如果您正苦于以下问题:Java BootstrapMethodEntry类的具体用法?Java BootstrapMethodEntry怎么用?Java BootstrapMethodEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BootstrapMethodEntry类属于com.sun.java.util.jar.pack.ConstantPool包,在下文中一共展示了BootstrapMethodEntry类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeBootstrapMethods

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
void writeBootstrapMethods(Class cls) throws IOException {
    List<BootstrapMethodEntry> bsms = cls.getBootstrapMethods();
    writeShort(bsms.size());
    for (BootstrapMethodEntry e : bsms) {
        writeRef(e.bsmRef);
        writeShort(e.argRefs.length);
        for (Entry argRef : e.argRefs) {
            writeRef(argRef);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:ClassWriter.java

示例2: resolve

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
Entry resolve() {
    Class cls = ClassReader.this.cls;
    Entry res;
    switch (tag) {
    case CONSTANT_InvokeDynamic:
        BootstrapMethodEntry iboots = cls.bootstrapMethods.get((Integer) refsOrIndexes[0]);
        DescriptorEntry         idescr = (DescriptorEntry) refsOrIndexes[1];
        res = ConstantPool.getInvokeDynamicEntry(iboots, idescr);
        break;
    default:
        throw new AssertionError();
    }
    return res;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:ClassReader.java

示例3: readBootstrapMethods

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
void readBootstrapMethods(Class cls) throws IOException {
    BootstrapMethodEntry[] bsms = new BootstrapMethodEntry[readUnsignedShort()];
    for (int i = 0; i < bsms.length; i++) {
        MethodHandleEntry bsmRef = (MethodHandleEntry) readRef(CONSTANT_MethodHandle);
        Entry[] argRefs = new Entry[readUnsignedShort()];
        for (int j = 0; j < argRefs.length; j++) {
            argRefs[j] = readRef(CONSTANT_LoadableValue);
        }
        bsms[i] = ConstantPool.getBootstrapMethodEntry(bsmRef, argRefs);
    }
    cls.setBootstrapMethods(Arrays.asList(bsms));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ClassReader.java

示例4: getBootstrapMethods

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
List<BootstrapMethodEntry> getBootstrapMethods() {
    return bootstrapMethods;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:Package.java

示例5: getBootstrapMethodMap

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
BootstrapMethodEntry[] getBootstrapMethodMap() {
    return (hasBootstrapMethods())
            ? bootstrapMethods.toArray(new BootstrapMethodEntry[bootstrapMethods.size()])
            : null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:Package.java

示例6: setBootstrapMethods

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
void setBootstrapMethods(Collection<BootstrapMethodEntry> bsms) {
    assert(bootstrapMethods == null);  // do not do this twice
    bootstrapMethods = new ArrayList<>(bsms);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:Package.java

示例7: getBootstrapMethodEntries

import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
Map<String, BootstrapMethodEntry> getBootstrapMethodEntries() {
    return bootstrapMethodEntries;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:TLGlobals.java


注:本文中的com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。