下面是反编译后的代码 if (!HelloWorld.this.doAction(this.m_action)) {
        HelloWorld.access$000("\"" + this.m_action + "\" is an unknown action.");
        WrapperManager.stop(0);
        return;
      }红色的方法找不到,应该是引用了一个外部类的方法哪位高手研究一下这个方法,请提供代码!
非常感谢

解决方案 »

  1.   

    javap -verbose HelloWorld
    看看
    HelloWorld.access$000("\"" + this.m_action + "\" is an unknown action.");
    这个地方是走到access的哪个方法
      

  2.   

    package org.tanukisoftware.wrapper;import java.io.PrintStream;
    import org.tanukisoftware.wrapper.WrapperListener;
    import org.tanukisoftware.wrapper.WrapperManager;
    import org.tanukisoftware.wrapper.test.AbstractActionApp;public class HelloWorld extends AbstractActionApp
      implements WrapperListener
    {
      private ActionRunner m_actionRunner;  public Integer start(String[] args)
      {
        System.out.println("start()");    if (args.length <= 0) {
          printHelp("Missing action parameter.");
        }
        prepareSystemOutErr();    this.m_actionRunner = new ActionRunner(args[0]);
        Thread actionThread = new Thread(this.m_actionRunner);
        actionThread.start();    return null;
      }  public int stop(int exitCode) {
        System.out.println("stop(" + exitCode + ")");    if (isNestedExit())
        {
          System.out.println("calling System.exit(" + exitCode + ") within stop.");
          System.exit(exitCode);
        }    return exitCode;
      }  public void controlEvent(int event) {
        System.out.println("controlEvent(" + event + ")");
        if (event == 200)
        {
          if (this.m_actionRunner != null)
            this.m_actionRunner.endThread();
        }
      }  private static void printHelp(String error_msg)
      {
        System.err.println("USAGE");
        System.err.println("");
        System.err.println("HelloWorld <action>");
        System.err.println("");
        System.err.println("[ACTIONS]");
        System.err.println("  Actions which should cause the Wrapper to exit cleanly:");
        System.err.println("   stop0                    : Calls WrapperManager.stop(0)");
        System.err.println("   exit0                    : Calls System.exit(0)");
        System.err.println("   stopimmediate0           : Calls WrapperManager.stopImmediate(0)");
        System.err.println("   stopandreturn0           : Calls WrapperManager.stopAndReturn(0)");
        System.err.println("  Actions which should cause the Wrapper to exit in an error state:");
        System.err.println("   stop1                    : Calls WrapperManager.stop(1)");
        System.err.println("   exit1                    : Calls System.exit(1)");
        System.err.println("   nestedexit1              : Calls System.exit(1) within WrapperListener.stop(1) callback");
        System.err.println("   stopimmediate1           : Calls WrapperManager.stopImmediate(1)");
        System.err.println("  Actions which should cause the Wrapper to restart the JVM:");
        System.err.println("   access_violation         : Calls WrapperManager.accessViolation");
        System.err.println("   access_violation_native  : Calls WrapperManager.accessViolationNative()");
        System.err.println("   appear_hung              : Calls WrapperManager.appearHung()");
        System.err.println("   halt0                    : Calls Runtime.getRuntime().halt(0)");
        System.err.println("   halt1                    : Calls Runtime.getRuntime().halt(1)");
        System.err.println("   restart                  : Calls WrapperManager.restart()");
        System.err.println("   restartandreturn         : Calls WrapperManager.restartAndReturn()");
        System.err.println("  Additional Tests:");
        System.err.println("   dump                     : Calls WrapperManager.requestThreadDump()");
        System.err.println("   deadlock_out             : Deadlocks the JVM's System.out and err streams.");
        System.err.println("   users                    : Start polling the current and interactive users.");
        System.err.println("   groups                   : Start polling the current and interactive users with groups.");
        System.err.println("   console                  : Prompt for actions in the console.");
        System.err.println("   idle                     : Do nothing just run in idle mode.");
        System.err.println("   properties               : Dump all System Properties to the console.");
        System.err.println("   configuration            : Dump all Wrapper Configuration Properties to the console.");
        System.err.println("");
        System.err.println("[EXAMPLE]");
        System.err.println("   HelloWorld access_violation_native ");
        System.err.println("");
        System.err.println("ERROR: " + error_msg);
        System.err.println("");    System.exit(-1);
      }  public static void main(String[] args)
      {
        System.out.println("Initializing...");    WrapperManager.start(new HelloWorld(), args);
      }  private class ActionRunner
        implements Runnable
      {
        private String m_action;
        private boolean m_alive;    public ActionRunner(String action)
        {
          this.m_action = action;
          this.m_alive = true;
        }    public void run()
        {
          try {
            Thread.sleep(5000L);
          } catch (InterruptedException e) {
          }
          if (!HelloWorld.this.doAction(this.m_action)) {
            HelloWorld.access$000("\"" + this.m_action + "\" is an unknown action.");
            WrapperManager.stop(0);
            return;
          }
          do
          {
            try
            {
              Thread.sleep(500L);
            } catch (Exception e) {
              e.printStackTrace();
            }
          }
          while (this.m_alive);
        }    public void endThread()
        {
          this.m_alive = false;
        }
      }
    }
      

  3.   

    是HelloWorld内部类access的什么方法么。。
      

  4.   

    这段源码是我从反编译器中复制过来的
    其中那个access方法应该是一个被编译后的方法
    这边看不到方法构造了
    我就是想知道这个方法的构造是怎么样的
    不然我做不下去了
    麻烦高人指点一下!!
    谢谢
      

  5.   

    [color=#FF00FF]红色方法应该是一个内部类的方法![/color]