org.eclipse.mtj.core.build.preverifier
Interface IPreverifier
-
All Superinterfaces:
-
IPersistable
-
public interface IPreverifier
- extends
IPersistable
The IPreverifier
interface represents a preverifier instance
that is required for preverification support on a
IMTJProject
.
The preverification process will make a series of checks on the Java
.class
files, generated after the compilation of the source code
of a
IMTJProject
or available inside a .jar
file. The
preverifier will annotate these files, and save them on a previously
specified folder for use on the final deployed Application Package.
All implementations of this interface are internal, and should
not be accessed directly by clients(compatibility will not be
maintained). To create a new instance of a preverifier, clients must
use
MTJCore.createPreverifier(String, Object)
informing the type
of the preverifier to be created and any parameter that is required by that
specific preverifier type.
Currently, only two types of preverifiers are supported:
-
Standard Preverifier, which is the default preverifier in MTJ, is
basically a wrapper on a preverifier binary and is represented by the
PREVERIFIER_STANDARD
constant.
-
Unknown Preverifier, which represents an Unknown preverifier and
is represented by the
PREVERIFIER_UNKNOWN
constant.
For more information on the preverification process, please visit CLDC-1.0 and CLDC-1.1
-
Since:
- 1.0
-
See Also:
-
MTJCore.createPreverifier(String, Object)
-
Restriction:
- This interface is not intended to be implemented by clients.
PREVERIFIER_STANDARD
static final
String PREVERIFIER_STANDARD
- Constant that represents the standard preverifier
-
See Also:
-
Constant Field Values
PREVERIFIER_UNKNOWN
static final
String PREVERIFIER_UNKNOWN
- Constant that represents an unknown preverifier
-
See Also:
-
Constant Field Values
preverify
IPreverificationError[] preverify(
IMTJProject mtjProject,
IResource[] toVerify,
IFolder outputFolder,
IProgressMonitor monitor)
throws CoreException
- Launch the preverification process on the specified resources from the
given
IMTJProject
.
-
-
-
Parameters:
-
mtjProject
- The project in which the resources to be preverified
reside. -
toVerify
- The resources to be preverified. -
outputFolder
- The folder into which the output is to be placed. -
monitor
- a progress monitor, or null
if progress
reporting is not desired.
-
Returns:
- an array of preverification error instances indicating the errors
found during execution.
-
Throws:
-
CoreException
- if this method fails. Reasons include:
- The existence of outputFolder could not be guaranteed.
- The command line for triggering the preverification
process could not be created.
- The preverification process could not be created
correctly.
preverifyJarFile
IPreverificationError[] preverifyJarFile(
IMTJProject mtjProject,
File jarFile,
IFolder outputFolder,
IProgressMonitor monitor)
throws CoreException
- Launch the preverification process on the classes available in the
specified jar file from the given
IMTJProject
.
Rather than trying to preverify a jar file, the file must be expanded
first and then we'll preverify against the expanded classes.
-
-
-
Parameters:
-
mtjProject
- The project in which the .jar
file to be
preverified reside. -
jarFile
- the .jar
file to be preverified. -
outputFolder
- The folder into which the output is to be placed. -
monitor
- a progress monitor, or null
if progress
reporting is not desired
-
Returns:
- an array of preverification error instances indicating the errors
found during execution.
-
Throws:
-
CoreException
- if this method fails. Reasons include:
- The
.jar
file could not be expanded.
- The existence of outputFolder could not be guaranteed.
- The command line for triggering the preverification
process could not be created.
- The preverification process could not be created
correctly.
-
IOException
getPreverifierExecutable
File getPreverifierExecutable()
- Return the file that is the preverifier binary, or
null
if
no preverifier was specified.
If this method return null
, MTJ will automatically assume
the use of the default preverifier configured in the UI.
-
-
-
Returns:
- the preverifier binary file, or
null
if no
preverifier was specified