Java Code Examples for com.sun.java.util.jar.pack.Package.Class#Member

The following examples show how to use com.sun.java.util.jar.pack.Package.Class#Member . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClassWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void writeMember(Class.Member m, boolean doMethod) throws IOException {
    if (verbose > 2)  Utils.log.fine("writeMember "+m);
    writeShort(m.flags);
    writeRef(m.getDescriptor().nameRef);
    writeRef(m.getDescriptor().typeRef);
    writeAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                    m);
}
 
Example 2
Source File: ClassReader.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 3
Source File: ClassWriter.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 4
Source File: ClassWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 5
Source File: ClassWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void writeMember(Class.Member m, boolean doMethod) throws IOException {
    if (verbose > 2)  Utils.log.fine("writeMember "+m);
    writeShort(m.flags);
    writeRef(m.getDescriptor().nameRef);
    writeRef(m.getDescriptor().typeRef);
    writeAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                    m);
}
 
Example 6
Source File: ClassReader.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 7
Source File: ClassReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 8
Source File: ClassWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void writeMember(Class.Member m, boolean doMethod) throws IOException {
    if (verbose > 2)  Utils.log.fine("writeMember "+m);
    writeShort(m.flags);
    writeRef(m.getDescriptor().nameRef);
    writeRef(m.getDescriptor().typeRef);
    writeAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                    m);
}
 
Example 9
Source File: ClassWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 10
Source File: ClassReader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 11
Source File: ClassWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 12
Source File: ClassWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void writeMember(Class.Member m, boolean doMethod) throws IOException {
    if (verbose > 2)  Utils.log.fine("writeMember "+m);
    writeShort(m.flags);
    writeRef(m.getDescriptor().nameRef);
    writeRef(m.getDescriptor().typeRef);
    writeAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                    m);
}
 
Example 13
Source File: ClassReader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 14
Source File: ClassWriter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 15
Source File: ClassWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 16
Source File: ClassReader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 17
Source File: ClassWriter.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeMember(Class.Member m, boolean doMethod) throws IOException {
    if (verbose > 2)  Utils.log.fine("writeMember "+m);
    writeShort(m.flags);
    writeRef(m.getDescriptor().nameRef);
    writeRef(m.getDescriptor().typeRef);
    writeAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                    m);
}
 
Example 18
Source File: ClassWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
void writeMembers(boolean doMethods) throws IOException {
    List<? extends Class.Member> mems;
    if (!doMethods)
        mems = cls.getFields();
    else
        mems = cls.getMethods();
    writeShort(mems.size());
    for (Class.Member m : mems) {
        writeMember(m, doMethods);
    }
}
 
Example 19
Source File: ClassReader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 20
Source File: ClassWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
void writeMember(Class.Member m, boolean doMethod) throws IOException {
    if (verbose > 2)  Utils.log.fine("writeMember "+m);
    writeShort(m.flags);
    writeRef(m.getDescriptor().nameRef);
    writeRef(m.getDescriptor().typeRef);
    writeAttributes(!doMethod ? ATTR_CONTEXT_FIELD : ATTR_CONTEXT_METHOD,
                    m);
}