本文整理汇总了Java中com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry类的典型用法代码示例。如果您正苦于以下问题:Java DescriptorEntry类的具体用法?Java DescriptorEntry怎么用?Java DescriptorEntry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DescriptorEntry类属于com.sun.java.util.jar.pack.ConstantPool包,在下文中一共展示了DescriptorEntry类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readMemberRefs
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry; //导入依赖的package包/类
void readMemberRefs(byte tag, Entry[] cpMap, CPRefBand cp_class, CPRefBand cp_desc) throws IOException {
// cp_Field:
// *cp_Field_class :DELTA5 (cp_Class)
// *cp_Field_desc :UDELTA5 (cp_Descr)
// cp_Method:
// *cp_Method_class :DELTA5 (cp_Class)
// *cp_Method_desc :UDELTA5 (cp_Descr)
// cp_Imethod:
// *cp_Imethod_class :DELTA5 (cp_Class)
// *cp_Imethod_desc :UDELTA5 (cp_Descr)
cp_class.expectLength(cpMap.length);
cp_class.readFrom(in);
cp_class.setIndex(getCPIndex(CONSTANT_Class));
cp_desc.expectLength(cpMap.length);
cp_desc.readFrom(in);
cp_desc.setIndex(getCPIndex(CONSTANT_NameandType));
for (int i = 0; i < cpMap.length; i++) {
ClassEntry mclass = (ClassEntry ) cp_class.getRef();
DescriptorEntry mdescr = (DescriptorEntry) cp_desc.getRef();
cpMap[i] = ConstantPool.getMemberEntry(tag, mclass, mdescr);
}
cp_class.doneDisbursing();
cp_desc.doneDisbursing();
}
示例2: Field
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry; //导入依赖的package包/类
public Field(int flags, DescriptorEntry descriptor) {
super(flags, descriptor);
assert(!descriptor.isMethod());
if (fields == null)
fields = new ArrayList<>();
boolean added = fields.add(this);
assert(added);
order = fields.size();
}
示例3: Method
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry; //导入依赖的package包/类
public Method(int flags, DescriptorEntry descriptor) {
super(flags, descriptor);
assert(descriptor.isMethod());
if (methods == null)
methods = new ArrayList<>();
boolean added = methods.add(this);
assert(added);
}
示例4: resolve
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry; //导入依赖的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;
}
示例5: readMember
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry; //导入依赖的package包/类
void readMember(boolean doMethod) throws IOException {
int mflags = readUnsignedShort();
Utf8Entry mname = readUtf8Ref();
SignatureEntry mtype = readSignatureRef();
DescriptorEntry descr = ConstantPool.getDescriptorEntry(mname, mtype);
Class.Member m;
if (!doMethod)
m = cls.new Field(mflags, descr);
else
m = cls.new Method(mflags, descr);
readAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
m);
}