• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2007 The Android Open Source Project
3  *
4  * Licensed under the Eclipse Public License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.eclipse.org/org/documents/epl-v10.php
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.ide.eclipse.adt.internal.project;
18 
19 import org.eclipse.core.runtime.IPath;
20 import org.eclipse.jdt.core.IClasspathContainer;
21 import org.eclipse.jdt.core.IClasspathEntry;
22 
23 /**
24  * Classpath container for the Android projects.
25  * This supports both the System classpath and the library dependencies.
26  */
27 class AndroidClasspathContainer implements IClasspathContainer {
28 
29     private final IClasspathEntry[] mClasspathEntry;
30     private final IPath mContainerPath;
31     private final String mName;
32     private final int mKind;
33 
34     /**
35      * Constructs the container with the {@link IClasspathEntry} representing the android
36      * framework jar file and the container id
37      * @param entries the entries representing the android framework and optional libraries.
38      * @param path the path containing the classpath container id.
39      * @param name the name of the container to display.
40      * @param the container kind. Can be {@link IClasspathContainer#K_DEFAULT_SYSTEM} or
41      *      {@link IClasspathContainer#K_APPLICATION}
42      */
AndroidClasspathContainer(IClasspathEntry[] entries, IPath path, String name, int kind)43     AndroidClasspathContainer(IClasspathEntry[] entries, IPath path, String name, int kind) {
44         mClasspathEntry = entries;
45         mContainerPath = path;
46         mName = name;
47         mKind = kind;
48     }
49 
getClasspathEntries()50     public IClasspathEntry[] getClasspathEntries() {
51         return mClasspathEntry;
52     }
53 
getDescription()54     public String getDescription() {
55         return mName;
56     }
57 
getKind()58     public int getKind() {
59         return mKind;
60     }
61 
getPath()62     public IPath getPath() {
63         return mContainerPath;
64     }
65 }
66