Package net.sf.rej.java.constantpool

Examples of net.sf.rej.java.constantpool.LongInfo


        sd.drawDefault("(");
        sd.drawKeyword("int");
        sd.drawDefault(") " + ii.getIntValue());
        break;
      case ConstantPoolInfo.LONG:
        LongInfo li = (LongInfo) constant;
        sd.drawDefault("(");
        sd.drawKeyword("long");
        sd.drawDefault(") " + li.getLongValue());
        break;
      case ConstantPoolInfo.UTF8:
        UTF8Info ui = (UTF8Info) constant;
        sd.drawString("\"");
        sd.drawString(ui.getValue());
View Full Code Here


    case ConstantPoolInfo.INTEGER:
      IntegerInfo ii = (IntegerInfo) cpi;
      bie.invoke("Edit Integer Info", String.valueOf(ii.getIntValue()));
      break;
    case ConstantPoolInfo.LONG:
      LongInfo li = (LongInfo) cpi;
      bie.invoke("Edit Long Info", String.valueOf(li.getLongValue()));
      break;
    case ConstantPoolInfo.STRING:
      StringInfo si = (StringInfo) cpi;
      bie.invoke("Edit String Info", si.getStringValue());
      break;
View Full Code Here

  }

  void validateAndInsertLongInfo(String str) throws BasicInfoEditor.ValidationException {
    try {
      long l = Long.parseLong(str);
      EditorFacade.getInstance().addConstantPoolInfo(this.cf.getPool(), new LongInfo(l, this.cf.getPool()));
    } catch (Exception e) {
      throw new BasicInfoEditor.ValidationException(e.getMessage());
    }
  }
View Full Code Here

      }
      EditorFacade.getInstance().modifyIntegerInfo(info, i);
      break;
    }
    case ConstantPoolInfo.LONG: {
      LongInfo info = (LongInfo) cpi;
      long l = 0;
      try {
        l = Long.parseLong(newValue);
      } catch (NumberFormatException nfe) {
        throw new BasicInfoEditor.ValidationException(
            "Not a valid long. (" + nfe.getMessage() + ")");
      }
      EditorFacade.getInstance().modifyLongInfo(info, l);
      break;
    }
    case ConstantPoolInfo.STRING: {
      StringInfo info = (StringInfo) cpi;
      int answer = JOptionPane.showOptionDialog(this,
          "Modify underlying UTF-8 info or create a new one.",
          "Modify String Info item",
          JOptionPane.YES_NO_CANCEL_OPTION,
          JOptionPane.QUESTION_MESSAGE, null, new String[] {
              "Modify", "Create new", "Cancel" }, "Modify");
      if (answer == JOptionPane.YES_OPTION) {
        // Modify UTF-8 Info
        UTF8Info ui = info.getUTF8Info();
        EditorFacade.getInstance().modifyUTF8Info(ui, newValue);
        break;

      } else if (answer == JOptionPane.NO_OPTION) {
        // Create a new UTF-8 Info
View Full Code Here

                int index = destinationPool.optionalAdd(iiCopy);
                copyParams.addValue(index);
                break;                                       
              }
              case ConstantPoolInfo.LONG: {
                LongInfo li = (LongInfo)cpi;
                LongInfo liCopy = new LongInfo(li.getLongValue(), destinationPool);
                int index = destinationPool.optionalAdd(liCopy);
                copyParams.addValue(index);
                break;                     
              }
              case ConstantPoolInfo.STRING: {
View Full Code Here

TOP

Related Classes of net.sf.rej.java.constantpool.LongInfo

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.