private static Method getAttachMethod ( Class < ? > vmClass ) throws SecurityException , NoSuchMethodException { return vmClass . getMethod ( "attach" , new Class < ? > [ ] { String . class } ) ; }
Finds attach method in VirtualMachine .