Package com.sun.java.util.jar.pack.ConstantPool

Examples of com.sun.java.util.jar.pack.ConstantPool.Entry.stringValue()


                } else {
                    globalRef = holder.getCPMap()[localRef];
                    if (e.refKind == CONSTANT_Signature
                        && globalRef.getTag() == CONSTANT_Utf8) {
                        // Cf. ClassReader.readSignatureRef.
                        String typeName = globalRef.stringValue();
                        globalRef = ConstantPool.getSignatureEntry(typeName);
                    } else if (e.refKind == CONSTANT_Literal) {
                        assert(globalRef.getTag() >= CONSTANT_Integer);
                        assert(globalRef.getTag() <= CONSTANT_String);
                    } else if (e.refKind != CONSTANT_All) {
View Full Code Here


            switch (tag) {
                case CONSTANT_Signature:
                    assert(false)// should not reach here
                    break;
                case CONSTANT_Utf8:
                    out.writeUTF(e.stringValue());
                    break;
                case CONSTANT_Integer:
                    out.writeInt(((NumberEntry)e).numberValue().intValue());
                    break;
                case CONSTANT_Float:
View Full Code Here

    }

    private SignatureEntry readSignatureRef() throws IOException {
        // The class file stores a Utf8, but we want a Signature.
        Entry e = readRef(CONSTANT_Utf8);
        return ConstantPool.getSignatureEntry(e.stringValue());
    }

    void read() throws IOException {
        boolean ok = false;
        try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.