コード例 #1
0
 public String getCodeWithArguments(
     Un fixedArguments, Vector<Integer> sizesOfIndividualParameters) {
   String ret = code;
   try {
     if (argumentFunction.size() != sizesOfIndividualParameters.size()) {
       Miscellaneous.printlnErr(
           "either bytecode defination file is wrong or opcode-parameter file is wrong.");
       Miscellaneous.printlnErr(
           "bytecode defination required "
               + argumentFunction.size()
               + " parameters, in "
               + "contrast the opcode-parameter file required "
               + sizesOfIndividualParameters.size()
               + " parameters");
       Miscellaneous.exit();
     }
     LFRevUn.bigEndian = true;
     for (int loop = argumentFunction.size() - 1; loop >= 0; loop--) {
       String nextThingToReplace = "@@" + (loop + 1);
       int argSize = sizesOfIndividualParameters.elementAt(loop);
       Un afterCutting = Un.cutBytes(argSize, fixedArguments);
       String toReplaceWith = "(0x" + afterCutting.toString() + ")";
       if (loop != argumentFunction.size() - 1) {
         toReplaceWith += ", ";
       }
       ret = ret.replace(nextThingToReplace, argumentType.elementAt(loop) + toReplaceWith);
     }
     LFRevUn.bigEndian = false;
   } catch (Exception d) {
     Miscellaneous.println("Error in bytecode defination file. " + this + ", " + fixedArguments);
     d.printStackTrace();
     Miscellaneous.exit();
   }
   return ret;
 }
コード例 #2
0
 String getCodeWithArguments(Un fixedArg) throws IOException {
   try {
     return code.replace("@@1", argumentType.elementAt(0) + "(0x" + fixedArg.toString() + ")");
   } catch (Exception d) {
     LogHolder.getInstanceOf()
         .addLog(" *******ERROR ********* in function getCodeWithArguments...", true);
     Miscellaneous.println(" Enter a character to continue...");
     System.in.read();
   }
   return "";
 }