KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ant > internal > ui > preferences > AbstractClasspathEntry


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.ant.internal.ui.preferences;
12
13 import java.net.URL JavaDoc;
14 import java.util.ArrayList JavaDoc;
15 import java.util.List JavaDoc;
16
17 import org.eclipse.ant.core.IAntClasspathEntry;
18
19 public abstract class AbstractClasspathEntry implements IClasspathEntry {
20
21     protected List JavaDoc fChildEntries = new ArrayList JavaDoc();
22     protected IClasspathEntry fParent = null;
23
24     /* (non-Javadoc)
25      * @see org.eclipse.ant.internal.ui.preferences.IClasspathEntry#getEntries()
26      */

27     public IAntClasspathEntry[] getEntries() {
28         return (IAntClasspathEntry[])fChildEntries.toArray(new IAntClasspathEntry[fChildEntries.size()]);
29     }
30
31     /* (non-Javadoc)
32      * @see org.eclipse.ant.internal.ui.preferences.IClasspathEntry#hasEntries()
33      */

34     public boolean hasEntries() {
35         return !fChildEntries.isEmpty();
36     }
37
38     /* (non-Javadoc)
39      * @see org.eclipse.ant.internal.ui.preferences.IClasspathEntry#getParent()
40      */

41     public IClasspathEntry getParent() {
42         return fParent;
43     }
44     
45     /**
46      * @param parent The parent to set.
47      */

48     public void setParent(IClasspathEntry parent) {
49         fParent = parent;
50     }
51     
52     /* (non-Javadoc)
53      * @see org.eclipse.ant.core.IAntClasspathEntry#getEntryURL()
54      */

55     public URL JavaDoc getEntryURL() {
56         return null;
57     }
58
59     /* (non-Javadoc)
60      * @see org.eclipse.ant.core.IAntClasspathEntry#getLabel()
61      */

62     public String JavaDoc getLabel() {
63         return toString();
64     }
65
66     /* (non-Javadoc)
67      * @see org.eclipse.ant.core.IAntClasspathEntry#isEclipseRuntimeRequired()
68      */

69     public boolean isEclipseRuntimeRequired() {
70         return false;
71     }
72 }
73
Popular Tags