• 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  */
26 class AndroidClasspathContainer implements IClasspathContainer {
27 
28     private IClasspathEntry[] mClasspathEntry;
29     private IPath mContainerPath;
30     private String mName;
31 
32     /**
33      * Constructs the container with the {@link IClasspathEntry} representing the android
34      * framework jar file and the container id
35      * @param entries the entries representing the android framework and optional libraries.
36      * @param path the path containing the classpath container id.
37      * @param name the name of the container to display.
38      */
AndroidClasspathContainer(IClasspathEntry[] entries, IPath path, String name)39     AndroidClasspathContainer(IClasspathEntry[] entries, IPath path, String name) {
40         mClasspathEntry = entries;
41         mContainerPath = path;
42         mName = name;
43     }
44 
getClasspathEntries()45     public IClasspathEntry[] getClasspathEntries() {
46         return mClasspathEntry;
47     }
48 
getDescription()49     public String getDescription() {
50         return mName;
51     }
52 
getKind()53     public int getKind() {
54         return IClasspathContainer.K_DEFAULT_SYSTEM;
55     }
56 
getPath()57     public IPath getPath() {
58         return mContainerPath;
59     }
60 }
61