KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > registry > spi > ConfigurationElementAttribute


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.core.internal.registry.spi;
12
13 import org.eclipse.core.runtime.IConfigurationElement;
14
15 /**
16  * Describes properties of configuration elements to be added to the registry.
17  * Properties are represented as pairs of strings: {attribute name; attribute value}.
18  * <p>
19  * It is expected that both attribute name and attribute value are not null.
20  * </p>
21  * <p>
22  * This class can be instantited.
23  * </p>
24  * <p>
25  * This class is not intended to be subclassed.
26  * </p>
27  * @see ConfigurationElementDescription
28  * @see IConfigurationElement
29  */

30 public final class ConfigurationElementAttribute {
31
32     /**
33      * Attribute name.
34      * @see IConfigurationElement#getAttributeNames()
35      */

36     private String JavaDoc name;
37
38     /**
39      * Attribute value.
40      * @see IConfigurationElement#getAttributeAsIs(String)
41      */

42     private String JavaDoc value;
43
44     /**
45      * Constructor.
46      *
47      * @param name attribute name
48      * @param value attribute value
49      */

50     public ConfigurationElementAttribute(String JavaDoc name, String JavaDoc value) {
51         this.name = name;
52         this.value = value;
53     }
54
55     /**
56      * Returns attribute name.
57      * @return attribute name
58      * @see IConfigurationElement#getAttributeNames()
59      */

60     public String JavaDoc getName() {
61         return name;
62     }
63
64     /**
65      * Returns value of the attribute.
66      * @return attribute value
67      * @see IConfigurationElement#getAttributeAsIs(String)
68      */

69     public String JavaDoc getValue() {
70         return value;
71     }
72 }
73
Popular Tags