< prev index next >

test/jdk/sun/tools/jps/JpsHelper.java

Print this page
rev 51789 : [mq]: asserts


   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import static jdk.testlibrary.Asserts.assertGreaterThan;
  25 import static jdk.testlibrary.Asserts.assertTrue;
  26 
  27 import java.io.BufferedWriter;
  28 import java.io.File;
  29 import java.io.FileWriter;
  30 import java.io.IOException;
  31 import java.nio.file.Files;
  32 import java.nio.file.Path;
  33 import java.nio.file.Paths;
  34 import java.util.ArrayList;
  35 import java.util.Arrays;
  36 import java.util.List;
  37 
  38 import jdk.test.lib.JDKToolLauncher;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 import jdk.test.lib.process.ProcessTools;
  41 import jdk.testlibrary.Asserts;
  42 import jdk.test.lib.Utils;
  43 
  44 /**
  45  * The helper class for running jps utility and verifying output from it
  46  */
  47 public final class JpsHelper {
  48 
  49     /**
  50      * Helper class for handling jps arguments
  51      */
  52     public enum JpsArg {
  53         q,
  54         l,
  55         m,
  56         v,
  57         V;
  58 
  59         /**
  60          * Generate all possible combinations of {@link JpsArg}
  61          * (31 argument combinations and no arguments case)




   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import static jdk.test.lib.Asserts.assertGreaterThan;
  25 import static jdk.test.lib.Asserts.assertTrue;
  26 
  27 import java.io.BufferedWriter;
  28 import java.io.File;
  29 import java.io.FileWriter;
  30 import java.io.IOException;
  31 import java.nio.file.Files;
  32 import java.nio.file.Path;
  33 import java.nio.file.Paths;
  34 import java.util.ArrayList;
  35 import java.util.Arrays;
  36 import java.util.List;
  37 
  38 import jdk.test.lib.JDKToolLauncher;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 import jdk.test.lib.process.ProcessTools;
  41 import jdk.test.lib.Asserts;
  42 import jdk.test.lib.Utils;
  43 
  44 /**
  45  * The helper class for running jps utility and verifying output from it
  46  */
  47 public final class JpsHelper {
  48 
  49     /**
  50      * Helper class for handling jps arguments
  51      */
  52     public enum JpsArg {
  53         q,
  54         l,
  55         m,
  56         v,
  57         V;
  58 
  59         /**
  60          * Generate all possible combinations of {@link JpsArg}
  61          * (31 argument combinations and no arguments case)


< prev index next >