eclipseme.core.model.impl
Class Preverifier

java.lang.Object
  extended byeclipseme.core.internal.utils.tools.AbstractTool
      extended byeclipseme.core.model.impl.Preverifier
All Implemented Interfaces:
IPreverifier
Direct Known Subclasses:
ParameterGuessingPreverifier

public abstract class Preverifier
extends eclipseme.core.internal.utils.tools.AbstractTool
implements IPreverifier

Object wrapper around the preverifier tool in the wireless toolkit.

Note: This class/interface is part of an interim API that is still under development and expected to change before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken as the API evolves.

Copyright (c) 2003-2005 Craig Setera
All Rights Reserved.
Licensed under the Eclipse Public License - v 1.0


$Revision: 1.5 $
$Date: 2005/07/07 02:36:58 $

Author:
Craig Setera

Field Summary
static java.lang.String PREVERIFIER
           
 
Constructor Summary
Preverifier()
          Constructor.
 
Method Summary
static java.lang.String extractClassName(org.eclipse.jdt.core.IJavaProject javaProject, org.eclipse.core.resources.IResource resource)
          Extract the class name from the specified IResource within the specified java project.
static org.eclipse.core.runtime.IPath extractResourcePath(org.eclipse.jdt.core.IJavaProject javaProject, org.eclipse.core.resources.IResource resource)
          Extract the class path from the specified IResource within the specified java project.
 java.util.Map preverify(IMidletSuiteProject midletProject, org.eclipse.core.resources.IResource[] toVerify, org.eclipse.core.resources.IFolder outputFolder, org.eclipse.core.runtime.IProgressMonitor monitor)
          Launch the preverification process on the specified resources.
 java.util.Map preverifyJarFile(IMidletSuiteProject midletProject, java.io.File jarFile, org.eclipse.core.resources.IFolder outputFolder, org.eclipse.core.runtime.IProgressMonitor monitor)
          Launch the preverification process on the specified jar file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREVERIFIER

public static final java.lang.String PREVERIFIER
See Also:
Constant Field Values
Constructor Detail

Preverifier

public Preverifier()
Constructor.

Method Detail

extractResourcePath

public static org.eclipse.core.runtime.IPath extractResourcePath(org.eclipse.jdt.core.IJavaProject javaProject,
                                                                 org.eclipse.core.resources.IResource resource)
                                                          throws org.eclipse.jdt.core.JavaModelException
Extract the class path from the specified IResource within the specified java project.

Parameters:
javaProject -
resource -
Returns:
the extracted resource path
Throws:
org.eclipse.jdt.core.JavaModelException

extractClassName

public static java.lang.String extractClassName(org.eclipse.jdt.core.IJavaProject javaProject,
                                                org.eclipse.core.resources.IResource resource)
                                         throws org.eclipse.jdt.core.JavaModelException
Extract the class name from the specified IResource within the specified java project.

Parameters:
javaProject - the java project to provide the relative name
resource - the resource to extract a class name
Returns:
the class name or null if the resource name cannot be converted for some reason.
Throws:
org.eclipse.jdt.core.JavaModelException

preverify

public java.util.Map preverify(IMidletSuiteProject midletProject,
                               org.eclipse.core.resources.IResource[] toVerify,
                               org.eclipse.core.resources.IFolder outputFolder,
                               org.eclipse.core.runtime.IProgressMonitor monitor)
                        throws org.eclipse.core.runtime.CoreException,
                               java.io.IOException
Description copied from interface: IPreverifier
Launch the preverification process on the specified resources.

Specified by:
preverify in interface IPreverifier
Parameters:
midletProject - 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 - Progress monitor
Returns:
A map of class names mapped to error information. If the map is empty there were no errors registered during the preverification.
Throws:
java.io.IOException
org.eclipse.core.runtime.CoreException
See Also:
IPreverifier.preverify(eclipseme.core.model.IMidletSuiteProject, org.eclipse.core.resources.IResource[], org.eclipse.core.resources.IFolder, org.eclipse.core.runtime.IProgressMonitor)

preverifyJarFile

public java.util.Map preverifyJarFile(IMidletSuiteProject midletProject,
                                      java.io.File jarFile,
                                      org.eclipse.core.resources.IFolder outputFolder,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)
                               throws org.eclipse.core.runtime.CoreException,
                                      java.io.IOException
Description copied from interface: IPreverifier
Launch the preverification process on the specified jar file.

Specified by:
preverifyJarFile in interface IPreverifier
Parameters:
midletProject - The project in which the resources to be preverified reside.
jarFile - The jar file to be preverified.
outputFolder - The folder into which the output is to be placed.
monitor - Progress monitor
Returns:
A map of class names mapped to error information. If the map is empty there were no errors registered during the preverification.
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException
See Also:
IPreverifier.preverifyJarFile(eclipseme.core.model.IMidletSuiteProject, java.io.File, org.eclipse.core.resources.IFolder, org.eclipse.core.runtime.IProgressMonitor)