Package org.cojen.classfile.constant

Examples of org.cojen.classfile.constant.ConstantUTFInfo


            int end_pc = start_pc + din.readUnsignedShort() + 1;
            int name_index = din.readUnsignedShort();
            int descriptor_index = din.readUnsignedShort();
            final int index = din.readUnsignedShort();

            final ConstantUTFInfo varName = (ConstantUTFInfo)cp.getConstant(name_index);
            final ConstantUTFInfo varDesc = (ConstantUTFInfo)cp.getConstant(descriptor_index);

            if (varDesc == null) {
                continue;
            }

            final Location startLocation = new FixedLocation(start_pc);
            final Location endLocation = new FixedLocation(end_pc);

            final Set<LocationRange> ranges = Collections
                .singleton((LocationRange) new LocationRangeImpl(startLocation, endLocation));

            LocalVariable localVar = new LocalVariable() {
                private String mName;
                private TypeDesc mType;

                {
                    mName = varName == null ? null : varName.getValue();
                    mType = TypeDesc.forDescriptor(varDesc.getValue());
                }

                public String getName() {
                    return mName;
                }
View Full Code Here


        if (varName == null) {
            int num = localVar.getNumber();
            varName = num < 0 ? "_" : ("v" + num + '$');
        }

        ConstantUTFInfo name = getConstantPool().addConstantUTF(varName);
        ConstantUTFInfo descriptor =
            getConstantPool().addConstantUTF(localVar.getType().getDescriptor());
        mEntries.add(new Entry(localVar, name, descriptor));

        mCleanEntries = null;
    }
View Full Code Here

                outer = null;
            } else {
                outer = (ConstantClassInfo)cp.getConstant(outer_index);
            }
           
            ConstantUTFInfo innerName;
            if (name_index == 0) {
                innerName = null;
            } else {
                innerName = (ConstantUTFInfo)cp.getConstant(name_index);
            }
View Full Code Here

            outerInfo = null;
        } else {
            outerInfo = getConstantPool().addConstantClass(outer);
        }

        ConstantUTFInfo nameInfo;
        if (name == null) {
            nameInfo = null;
        } else {
            nameInfo = getConstantPool().addConstantUTF(name);
        }
View Full Code Here

    {
        ConstantPool cp = parent.getConstantPool();

        int modifier = din.readUnsignedShort();
        int index = din.readUnsignedShort();
        ConstantUTFInfo nameConstant = (ConstantUTFInfo)cp.getConstant(index);
        index = din.readUnsignedShort();
        ConstantUTFInfo descConstant = (ConstantUTFInfo)cp.getConstant(index);

        FieldInfo info = new FieldInfo(parent, modifier, nameConstant, descConstant);

        // Read attributes.
        int size = din.readUnsignedShort();
View Full Code Here

    {
        ConstantPool cp = parent.getConstantPool();

        int modifier = din.readUnsignedShort();
        int index = din.readUnsignedShort();
        ConstantUTFInfo nameConstant = (ConstantUTFInfo)cp.getConstant(index);
        index = din.readUnsignedShort();
        ConstantUTFInfo descConstant = (ConstantUTFInfo)cp.getConstant(index);

        MethodInfo info = new MethodInfo(parent, modifier,
                                         nameConstant, descConstant);

        // Read attributes.
View Full Code Here

    /**
     * Get or create a constant UTF string from the constant pool.
     */
    public ConstantUTFInfo addConstantUTF(String str) {
        return (ConstantUTFInfo)addConstant(new ConstantUTFInfo(str));
    }
View Full Code Here

            int entryCount = 1;
            ConstantInfo constant;

            switch (tag) {
            case ConstantInfo.TAG_UTF8:
                constant = new ConstantUTFInfo(din.readUTF());
                break;
            case ConstantInfo.TAG_INTEGER:
                constant = new ConstantIntegerInfo(din.readInt());
                break;
            case ConstantInfo.TAG_FLOAT:
View Full Code Here

    /**
     * Get or create a constant UTF string from the constant pool.
     */
    public ConstantUTFInfo addConstantUTF(String str) {
        return (ConstantUTFInfo)addConstant(new ConstantUTFInfo(str));
    }
View Full Code Here

    {
        ConstantPool cp = parent.getConstantPool();

        int modifier = din.readUnsignedShort();
        int index = din.readUnsignedShort();
        ConstantUTFInfo nameConstant = (ConstantUTFInfo)cp.getConstant(index);
        index = din.readUnsignedShort();
        ConstantUTFInfo descConstant = (ConstantUTFInfo)cp.getConstant(index);

        FieldInfo info = new FieldInfo(parent, modifier, nameConstant, descConstant);

        // Read attributes.
        int size = din.readUnsignedShort();
View Full Code Here

TOP

Related Classes of org.cojen.classfile.constant.ConstantUTFInfo

Copyright © 2018 www.massapicom. 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.