KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > target > TargetModelFactory


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core.target;
12
13 import org.eclipse.pde.internal.core.itarget.IAdditionalLocation;
14 import org.eclipse.pde.internal.core.itarget.IArgumentsInfo;
15 import org.eclipse.pde.internal.core.itarget.IEnvironmentInfo;
16 import org.eclipse.pde.internal.core.itarget.IImplicitDependenciesInfo;
17 import org.eclipse.pde.internal.core.itarget.ILocationInfo;
18 import org.eclipse.pde.internal.core.itarget.ITarget;
19 import org.eclipse.pde.internal.core.itarget.ITargetFeature;
20 import org.eclipse.pde.internal.core.itarget.ITargetJRE;
21 import org.eclipse.pde.internal.core.itarget.ITargetModel;
22 import org.eclipse.pde.internal.core.itarget.ITargetModelFactory;
23 import org.eclipse.pde.internal.core.itarget.ITargetPlugin;
24
25 public class TargetModelFactory implements ITargetModelFactory {
26     
27     private ITargetModel fModel;
28
29     public TargetModelFactory(ITargetModel model) {
30         fModel = model;
31     }
32
33     public ITarget createTarget() {
34         return new Target(fModel);
35     }
36
37     public IArgumentsInfo createArguments() {
38         return new ArgumentsInfo(fModel);
39     }
40
41     public IEnvironmentInfo createEnvironment() {
42         return new EnvironmentInfo(fModel);
43     }
44
45     public ITargetJRE createJREInfo() {
46         return new TargetJRE(fModel);
47     }
48
49     public ILocationInfo createLocation() {
50         return new LocationInfo(fModel);
51     }
52     
53     public IImplicitDependenciesInfo createImplicitPluginInfo() {
54         return new ImplicitDependenciesInfo(fModel);
55     }
56
57     public ITargetPlugin createPlugin() {
58         return new TargetPlugin(fModel);
59     }
60
61     public ITargetFeature createFeature() {
62         return new TargetFeature(fModel);
63     }
64     
65     public IAdditionalLocation createAdditionalLocation() {
66         return new AdditionalDirectory(fModel);
67     }
68
69 }
70
Popular Tags