KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > components > registry > ScopeDefinition


1 /*******************************************************************************
2  * Copyright (c) 2004, 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.ui.internal.components.registry;
12
13 import java.util.ArrayList JavaDoc;
14 import java.util.List JavaDoc;
15
16 import org.eclipse.ui.internal.components.framework.ClassIdentifier;
17
18 /**
19  * @since 3.1
20  */

21 public class ScopeDefinition {
22     List JavaDoc superTypes = new ArrayList JavaDoc();
23     List JavaDoc dependencies = new ArrayList JavaDoc();
24     String JavaDoc description = ""; //$NON-NLS-1$
25

26     public void setDescription(String JavaDoc descr) {
27         this.description = descr;
28     }
29     
30     /**
31      * @return Returns the description.
32      */

33     public String JavaDoc getDescription() {
34         return description;
35     }
36     
37     public void addExtends(SymbolicScopeReference ref) {
38         superTypes.add(ref);
39     }
40  
41     public void addDependency(ClassIdentifier type) {
42         dependencies.add(type);
43     }
44     
45     public SymbolicScopeReference[] getExtends() {
46         return (SymbolicScopeReference[]) superTypes.toArray(new SymbolicScopeReference[superTypes.size()]);
47     }
48     
49     public ClassIdentifier[] getDependencies() {
50         return (ClassIdentifier[]) dependencies.toArray(new ClassIdentifier[dependencies.size()]);
51     }
52     
53 }
54
Popular Tags