本文整理汇总了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);
}
}
}
示例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;
}
示例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));
}
示例4: getBootstrapMethods
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
List<BootstrapMethodEntry> getBootstrapMethods() {
return bootstrapMethods;
}
示例5: getBootstrapMethodMap
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
BootstrapMethodEntry[] getBootstrapMethodMap() {
return (hasBootstrapMethods())
? bootstrapMethods.toArray(new BootstrapMethodEntry[bootstrapMethods.size()])
: null;
}
示例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);
}
示例7: getBootstrapMethodEntries
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry; //导入依赖的package包/类
Map<String, BootstrapMethodEntry> getBootstrapMethodEntries() {
return bootstrapMethodEntries;
}