Package net.sf.rej.gui.editor

Examples of net.sf.rej.gui.editor.ClassChooser


                    }
                }
                break;
            }
            case TYPE_CONSTANT_POOL_CLASS: {
                ClassChooser chooser = (ClassChooser) choosers.get(i);
                Object obj = chooser.getValue();
                if (obj instanceof Integer) {
                    //params.setValue(i, obj);
                    group.add(new ParamModifyAction(instruction, i, obj));
                } else {
                    String className = (String)obj;
                    int index = this.cf.getPool().indexOfClassRef(className);
                    if(index != -1) {
                        group.add(new ParamModifyAction(instruction, i, Integer.valueOf(index)));
                    } else {
                        group.add(new AddClassRefAction(className, instruction, i, this.cf.getPool()));
                    }
                }
                break;
            }
            case TYPE_CONSTANT: {
                ConstantChooser chooser = (ConstantChooser) choosers.get(i);
                Integer value = (Integer)chooser.getValue();
                if(value.intValue() < -128 || value.intValue() > 127) {
                    throw new RuntimeException("Constant value out of range.");
                }
                group.add(new ParamModifyAction(instruction, i, chooser.getValue()));
                break;
            }
            case TYPE_CONSTANT_WIDE: {
                ConstantChooser chooser = (ConstantChooser) choosers.get(i);
                /* @TODO range check? */
                group.add(new ParamModifyAction(instruction, i, chooser.getValue()));
                break;
            }
            case TYPE_ARRAYTYPE: {
                ArrayTypeChooser chooser = (ArrayTypeChooser) choosers.get(i);
                group.add(new ParamModifyAction(instruction, i, chooser.getValue()));
                break;
            }
            case TYPE_CONSTANT_POOL_CONSTANT: {
                ConstantpoolConstantChooser chooser = (ConstantpoolConstantChooser) choosers.get(i);
                group.add(new ParamModifyAction(instruction, i, chooser.getValue()));
                break;
            }
            case TYPE_LOCAL_VARIABLE_READONLY:
                // no action required
                break;
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.editor.ClassChooser

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.