test_class.declarator: vmHandler
test_class.original_string: VirtualMachineHandler vmHandler;
test_class.type: VirtualMachineHandler
test_class.var_name: vmHandler
test_class.file: agent/jvm/src/test/java/org/jolokia/jvmagent/client/util/VirtualMachineHandlerTest.java
test_class.identifier: VirtualMachineHandlerTest
test_case.body: @Test
      public void listAndAttach() throws Exception, NoSuchMethodException, IllegalAccessException {
          List<ProcessDescription> procs = vmHandler.listProcesses();
          assertTrue(procs.size() > 0);
          boolean foundAtLeastOne = false;
          for (ProcessDescription p : procs) {
              try {
                  foundAtLeastOne |= tryAttach(p.getId());
              } catch (Exception exp) {
                  System.err.println("ERROR: " + p.getId() + " " + p.getDisplay() + ": " + exp);
              }
          }
          assertTrue(foundAtLeastOne);
      }
test_case.class_method_signature: VirtualMachineHandlerTest.listAndAttach()
test_case.full_signature: @Test public void listAndAttach()
test_case.identifier: listAndAttach
test_case.invocations: listProcesses assertTrue size tryAttach getId println getId getDisplay assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void listAndAttach()
focal_class.declarator: options
focal_class.modifier: private
focal_class.original_string: private OptionsAndArgs options;
focal_class.type: OptionsAndArgs
focal_class.var_name: options
focal_class.file: agent/jvm/src/main/java/org/jolokia/jvmagent/client/util/VirtualMachineHandler.java
focal_class.identifier: VirtualMachineHandler
focal_class.class_method_signature: VirtualMachineHandler.VirtualMachineHandler(OptionsAndArgs pOptions)
focal_class.full_signature: public  VirtualMachineHandler(OptionsAndArgs pOptions)
focal_class.identifier: VirtualMachineHandler
focal_class.modifiers: public
focal_class.parameters: (OptionsAndArgs pOptions)
focal_class.signature:  VirtualMachineHandler(OptionsAndArgs pOptions)
focal_class.class_method_signature: VirtualMachineHandler.attachVirtualMachine()
focal_class.full_signature: public Object attachVirtualMachine()
focal_class.identifier: attachVirtualMachine
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Object
focal_class.signature: Object attachVirtualMachine()
focal_class.class_method_signature: VirtualMachineHandler.getPidErrorMesssage(String pid, String label, Class vmClass)
focal_class.full_signature: private String getPidErrorMesssage(String pid, String label, Class vmClass)
focal_class.identifier: getPidErrorMesssage
focal_class.modifiers: private
focal_class.parameters: (String pid, String label, Class vmClass)
focal_class.return: String
focal_class.signature: String getPidErrorMesssage(String pid, String label, Class vmClass)
focal_class.class_method_signature: VirtualMachineHandler.detachAgent(Object pVm)
focal_class.full_signature: public void detachAgent(Object pVm)
focal_class.identifier: detachAgent
focal_class.modifiers: public
focal_class.parameters: (Object pVm)
focal_class.return: void
focal_class.signature: void detachAgent(Object pVm)
focal_class.class_method_signature: VirtualMachineHandler.listProcesses()
focal_class.full_signature: public List<ProcessDescription> listProcesses()
focal_class.identifier: listProcesses
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<ProcessDescription>
focal_class.signature: List<ProcessDescription> listProcesses()
focal_class.class_method_signature: VirtualMachineHandler.findProcess(Pattern pPattern)
focal_class.full_signature: public ProcessDescription findProcess(Pattern pPattern)
focal_class.identifier: findProcess
focal_class.modifiers: public
focal_class.parameters: (Pattern pPattern)
focal_class.return: ProcessDescription
focal_class.signature: ProcessDescription findProcess(Pattern pPattern)
focal_class.class_method_signature: VirtualMachineHandler.getProcessId(OptionsAndArgs pOpts)
focal_class.full_signature: private String getProcessId(OptionsAndArgs pOpts)
focal_class.identifier: getProcessId
focal_class.modifiers: private
focal_class.parameters: (OptionsAndArgs pOpts)
focal_class.return: String
focal_class.signature: String getProcessId(OptionsAndArgs pOpts)
focal_class.class_method_signature: VirtualMachineHandler.getOwnProcessId()
focal_class.full_signature: private String getOwnProcessId()
focal_class.identifier: getOwnProcessId
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getOwnProcessId()
focal_class.class_method_signature: VirtualMachineHandler.lookupVirtualMachineClass()
focal_class.full_signature: private Class lookupVirtualMachineClass()
focal_class.identifier: lookupVirtualMachineClass
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Class
focal_class.signature: Class lookupVirtualMachineClass()
focal_method.body: public List<ProcessDescription> listProcesses() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
          List<ProcessDescription> ret = new ArrayList<ProcessDescription>();
          Class vmClass = lookupVirtualMachineClass();
          Method method = vmClass.getMethod("list");
          List vmDescriptors = (List) method.invoke(null);
          for (Object descriptor : vmDescriptors) {
              Method idMethod = descriptor.getClass().getMethod("id");
              String id = (String) idMethod.invoke(descriptor);
              Method displayMethod = descriptor.getClass().getMethod("displayName");
              String display = (String) displayMethod.invoke(descriptor);
              ret.add(new ProcessDescription(id, display));
          }
          return ret;
      }
focal_method.class_method_signature: VirtualMachineHandler.listProcesses()
focal_method.full_signature: public List<ProcessDescription> listProcesses()
focal_method.identifier: listProcesses
focal_method.invocations: lookupVirtualMachineClass getMethod invoke getMethod getClass invoke getMethod getClass invoke add
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: List<ProcessDescription>
focal_method.signature: List<ProcessDescription> listProcesses()