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


Java DescriptorEntry类代码示例

本文整理汇总了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();
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:25,代码来源:PackageReader.java

示例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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Package.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Package.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:ClassReader.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:ClassReader.java


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