/** * @see #getJavaBinExecutablePath(boolean) */ public static String getJavaBinExecutablePath() { return getJavaBinExecutablePath(false); }
/** * Only log once for a class * @param className * @param msg */ public synchronized void logWarn(String className, String msg){ AtMostOnceLogger.warn(logger,msg); }
/** * Enqueues a string in the queue for input strings. These strings will be * consumed by those GUI elements that required a string input * * @param data * the string to be queued */ public static void enqueueInputString(String data) { getInstance().enqueueInputString0(data); }
private static int getInputOkCancelSelection() { // first, we record that the SUT has issued a call // to JOptionPane.showConfirmDialog() JOptionPaneInputs.getInstance().addDialog(GUIAction.OK_CANCEL_SELECTION); // second, we check if an input is specified for that GUI stimulus if (JOptionPaneInputs.getInstance().containsOkCancelSelection()) { // return the specified input final int str = JOptionPaneInputs.getInstance().dequeueOkCancelSelection(); return str; } else { // return -1 by default if no input was specified return JOptionPane.CLOSED_OPTION; } }
private static String getStringInput() { // first, we record that the SUT issued a call to // JOptionPane.showInputDialog() JOptionPaneInputs.getInstance().addDialog(GUIAction.STRING_INPUT); // second, we check if an input is specified for that GUI stimulus if (JOptionPaneInputs.getInstance().containsStringInput()) { // return the specified input final String str = JOptionPaneInputs.getInstance().dequeueStringInput(); return str; } else { // return null by default if no input was specified return null; } }
private static int getInputYesNoSelection() { // first, we record that the SUT has issued a call // to JOptionPane.showConfirmDialog() JOptionPaneInputs.getInstance().addDialog(GUIAction.YES_NO_SELECTION); // second, we check if an input is specified for that GUI stimulus if (JOptionPaneInputs.getInstance().containsYesNoSelection()) { // return the specified input final int str = JOptionPaneInputs.getInstance().dequeueYesNoSelection(); return str; } else { // return -1 by default if no input was specified return JOptionPane.CLOSED_OPTION; } }
private static int getInputYesNoCancelSelection() { // first, we record that the SUT has issued a call // to JOptionPane.showConfirmDialog() JOptionPaneInputs.getInstance().addDialog(GUIAction.YES_NO_CANCEL_SELECTION); // second, we check if an input is specified for that GUI stimulus if (JOptionPaneInputs.getInstance().containsYesNoCancelSelection()) { // return the specified input final int str = JOptionPaneInputs.getInstance().dequeueYesNoCancelSelection(); return str; } else { // return -1 by default if no input was specified return JOptionPane.CLOSED_OPTION; } }
public EvoEntityManager(EntityManager em, EntityManagerFactory factory) throws IllegalArgumentException{ Inputs.checkNull(em,factory); this.em = em; this.factory = factory; }
public static void enqueueYesNoSelection(int selection) { getInstance().enqueueYesNoSelection0(selection); }
public static void enqueueOptionSelection(int selection) { getInstance().enqueueOptionSelection0(selection); }
public static void enqueueOkCancelSelection(int selection) { getInstance().enqueueOkCancelSelection0(selection); }
public static void enqueueYesNoCancelSelection(int selection) { getInstance().enqueueYesNoCancelSelection0(selection); }
/** * * @return a new {@code InputStream} instance that can be used to read the content of this remote file */ public InputStream getInputStream(){ return new ByteDataInputStream(data); }
public static void error(Logger logger, String message){ logAtMostOnce(logger, message, true); } }
public synchronized static JOptionPaneInputs getInstance() { if (instance == null) { instance = new JOptionPaneInputs(); } return instance; }
public boolean hasProperty(String property) throws IllegalArgumentException{ Inputs.checkNull(property); return false; //TODO }
@Override public InputStream getInputStream() throws IOException { return new ByteDataInputStream(body); }
public static void warn(Logger logger, String message){ logAtMostOnce(logger,message,false); }
@Deprecated // better (more precise results) to use the other constructor public MethodDescriptor(String className, String methodName, String inputParameterMatchers) throws IllegalArgumentException{ Inputs.checkNull(methodName,inputParameterMatchers); this.className = className; this.methodName = methodName; this.inputParameterMatchers = inputParameterMatchers; counter = 0; }
public static boolean canInstantiateOnlyOnce(Class<?> klass) throws IllegalArgumentException{ Inputs.checkNull(klass); for(Class<?> c : classes) { if(c.isAssignableFrom(klass)){ return true; } } return false; } }