1
/*******************************************************************************
2
* Copyright (c) 2011 Red Hat Inc. and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Alexander Kurtakov - initial API and implementation
10
*******************************************************************************/
12
package org.eclipse.linuxtools.rpmstubby;
14
import org.eclipse.core.resources.IFile;
15
import org.eclipse.linuxtools.internal.rpmstubby.StubbyGenerator;
16
import org.eclipse.linuxtools.internal.rpmstubby.StubbyPomGenerator;
19
* Utility API for stubifying spec files for different input types.
22
public class Generator {
24
private InputType type;
27
* Creates the generator for the given input type.
30
* The input type for this generator.
32
public Generator(InputType type) {
37
* Generate the spec file for the given input file.
42
public void generate(IFile file) {
45
new StubbyGenerator(file).writeContent();
48
new StubbyPomGenerator(file).writeContent();