public IType[] searchMainMethods(IRunnableContext context, final IJavaSearchScope scope, final int style) throws InvocationTargetException, InterruptedException  { int allFlags=  IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS | IJavaElementSearchConstants.CONSIDER_BINARIES; Assert.isTrue((style | allFlags) == allFlags);
public IType[] searchMainMethods(IProgressMonitor pm, IJavaSearchScope scope, int style) throws JavaModelException { List typesFound= new ArrayList(200);
	public IType[] searchMainMethods(IRunnableContext context, final IJavaSearchScope scope, final int style) throws InvocationTargetException, InterruptedException  {		int allFlags=  IJavaElementSearchConstants.CONSIDER_EXTERNAL_JARS | IJavaElementSearchConstants.CONSIDER_BINARIES;		Assert.isTrue((style | allFlags) == allFlags);				final IType[][] res= new IType[1][];				IRunnableWithProgress runnable= new IRunnableWithProgress() {			public void run(IProgressMonitor pm) throws InvocationTargetException {				try {					res[0]= searchMainMethods(pm, scope, style);				} catch (JavaModelException e) {					throw new InvocationTargetException(e);				}			}		};		context.run(true, true, runnable);				return res[0];	}