Package org.gjt.jclasslib.structures.constants

Examples of org.gjt.jclasslib.structures.constants.ConstantMethodHandleInfo


    public void show(TreePath treePath) {

        int constantPoolIndex = constantPoolIndex(treePath);

        try {
            ConstantMethodHandleInfo entry = (ConstantMethodHandleInfo)services.getClassFile().getConstantPoolEntry(constantPoolIndex, ConstantMethodHandleInfo.class);
            classElementOpener.setCPInfo(entry);

            lblKind.setText(entry.getType());
            switch (entry.getType()) {
                case ConstantMethodHandleInfo.TYPE_GET_FIELD:
                    lblKindVerbose.setText("REF_getField");
                    break;
                case ConstantMethodHandleInfo.TYPE_GET_STATIC:
                    lblKindVerbose.setText("REF_getStatic");
                    break;
                case ConstantMethodHandleInfo.TYPE_PUT_FIELD:
                    lblKindVerbose.setText("REF_putField");
                    break;
                case ConstantMethodHandleInfo.TYPE_PUT_STATIC:
                    lblKindVerbose.setText("REF_putStatic");
                    break;
                case ConstantMethodHandleInfo.TYPE_INVOKE_VIRTUAL:
                    lblKindVerbose.setText("REF_invokeVirtual");
                    break;
                case ConstantMethodHandleInfo.TYPE_INVOKE_STATIC:
                    lblKindVerbose.setText("REF_invokeStatic");
                    break;
                case ConstantMethodHandleInfo.TYPE_INVOKE_SPECIAL:
                    lblKindVerbose.setText("REF_invokeSpecial");
                    break;
                case ConstantMethodHandleInfo.TYPE_NEW_INVOKE_SPECIAL:
                    lblKindVerbose.setText("REF_newInvokeSpecial");
                    break;
                case ConstantMethodHandleInfo.TYPE_INVOKE_INTERFACE:
                    lblKindVerbose.setText("REF_invokeInterface");
                    break;
            }

            constantPoolHyperlink(lblReference,
                lblReferenceVerbose,
                entry.getReferenceIndex());

        } catch (InvalidByteCodeException ex) {
            lblKindVerbose.setText(MESSAGE_INVALID_CONSTANT_POOL_ENTRY);
        }
View Full Code Here


        int constantPoolIndex = constantPoolIndex(treePath);

        try {
            ClassFile classFile = services.getClassFile();
            ConstantMethodHandleInfo entry = (ConstantMethodHandleInfo)classFile.getConstantPoolEntry(constantPoolIndex, ConstantMethodHandleInfo.class);

            lblKind.setText(entry.getTypeVerbose());
            constantPoolHyperlink(lblReference,
                lblReferenceVerbose,
                entry.getReferenceIndex());

        } catch (InvalidByteCodeException ex) {
            lblKind.setText(MESSAGE_INVALID_CONSTANT_POOL_ENTRY);
        }
View Full Code Here

TOP

Related Classes of org.gjt.jclasslib.structures.constants.ConstantMethodHandleInfo

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.