Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.preverifier
Class StandardPreverifierFactory

java.lang.Object
  extended by org.eclipse.mtj.core.model.preverifier.StandardPreverifierFactory

public class StandardPreverifierFactory
extends Object

A factory implementation for generating instances of StandardPreverifier with the appropriate parameters. Those parameters are retrieved by running the preverifier and using the output to make an educated guess concerning the required parameter structure.

There are three main categories of preverifiers that are supported by this class, all of which are presumably derived from (or are copies of) Sun preverifiers:

The basic strategy of this class is to run the preverifier without any command line arguments and capture the result. We then inspect the output for the presence of the various options and, when we find them, add them to the arguments we will use for the various preverifications. Note that we have to check both the stdout results and the stderr results, because some preverifiers send their usage to stdout (Sun) and other send it to stderr (Motorola).


Method Summary
static StandardPreverifier createPreverifier(File preverifierExecutable)
          Create a new StandardPreverifier instance for the specified executable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createPreverifier

public static StandardPreverifier createPreverifier(File preverifierExecutable)
                                             throws CoreException
Create a new StandardPreverifier instance for the specified executable. Returns null if the preverifier cannot be created for some reason.

Parameters:
preverifierExecutable -
Returns:
Throws:
CoreException - if failed to get the preverifier parameters.

Mobile Tools for Java
Release 1.0