Class CommandPrompt

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Runnable, Accessible, RootPaneContainer, WindowConstants

public class CommandPrompt extends JFrame implements Runnable
This was technically started in 3.3 but finished in 3.4.1!!! This class represents the entirety of the Reflection based command prompt system. This command prompt features a simple GUI that calls methods of any modifier type and run them via Java's Reflection API. This utility should be used with care as this command access has the utmost access to all methods given to it via addInvokable(Object, Class)
Since:
3.4.1
Author:
Jack Meng
See Also:
  • Field Details

  • Constructor Details

    • CommandPrompt

      public CommandPrompt()
  • Method Details

    • arrayStr

      public static String arrayStr(Object... e)
      Parameters:
      e -
      Returns:
      String
    • get_str__

      private String get_str__()
      Returns:
      String
    • purge__

      private static String[] purge__(String[] arr, String ele)
      Parameters:
      arr -
      ele -
      Returns:
      String[]
    • invoke__

      private void invoke__()
    • param_str__

      private String param_str__(Class<?>[] paramsDefs)
      Parameters:
      paramsDefs -
      Returns:
      String
    • help

      @Invokable public String help()
      Returns:
      String
    • prompt_zero_cmd__

      private String prompt_zero_cmd__()
      Returns:
      String
    • wrap

      public static String wrap(String text, Color bg, Color fg)
      Parameters:
      text -
      bg -
      fg -
      Returns:
      String
    • clearBuffer

      @Invokable(aliases="clear") public void clearBuffer()
    • sys_properties

      @Invokable(aliases="system_properties") public String sys_properties()
      Returns:
      String
    • print

      public void print(Object... e)
      Parameters:
      e -
    • addInvokable

      public void addInvokable(Object instance, Class<?> invs)
      Parameters:
      instance -
      invs -
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • echo

      public static String echo(String[] args)
      Parameters:
      args -
      Returns:
      String
    • main

      public static void main(String... args)
      Parameters:
      args -