KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > jdom > IDOMField


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.jdt.core.jdom;
12
13 /**
14  * Represents a field declaration. The corresponding
15  * syntactic units are FieldDeclaration (JLS2 8.3) and ConstantDeclaration
16  * (JLS2 9.3) restricted to a single VariableDeclarator clause.
17  * A field has no children. The parent of a field is a type.
18  * <p>
19  * This interface is not intended to be implemented by clients.
20  * </p>
21  * @deprecated The JDOM was made obsolete by the addition in 2.0 of the more
22  * powerful, fine-grained DOM/AST API found in the
23  * org.eclipse.jdt.core.dom package.
24  */

25 public interface IDOMField extends IDOMMember {
26 /**
27  * Returns the initializer expression for this field.
28  * The syntax for an initializer corresponds to VariableInitializer (JLS2 8.3).
29  * <p>
30  * Note: The expression does not include a "<code>=</code>".
31  * </p>
32  *
33  * @return the initializer expression, or <code>null</code> if this field does
34  * not have an initializer
35  */

36 public String JavaDoc getInitializer();
37 /**
38  * The <code>IDOMField</code> refinement of this <code>IDOMNode</code>
39  * method returns the name of this field. The syntax for the name of a field
40  * corresponds to VariableDeclaratorId (JLS2 8.3).
41  *
42  * @return the name of this field
43  */

44 public String JavaDoc getName();
45 /**
46  * Returns the type name of this field. The syntax for a type name of a field
47  * corresponds to Type in Field Declaration (JLS2 8.3).
48  *
49  * @return the type name
50  */

51 public String JavaDoc getType();
52 /**
53  * Sets the initializer expression for this field.
54  * The syntax for an initializer corresponds to VariableInitializer (JLS2 8.3).
55  * <p>
56  * Note: The expression does not include a "<code>=</code>".
57  * </p>
58  *
59  * @param initializer the initializer expression, or <code>null</code> indicating
60  * the field does not have an initializer
61  */

62 public void setInitializer(String JavaDoc initializer);
63 /**
64  * The <code>IDOMField</code> refinement of this <code>IDOMNode</code>
65  * method sets the name of this field. The syntax for the name of a field
66  * corresponds to VariableDeclaratorId (JLS2 8.3).
67  *
68  * @param name the given name
69  * @exception IllegalArgumentException if <code>null</code> is specified
70  */

71 public void setName(String JavaDoc name) throws IllegalArgumentException JavaDoc;
72 /**
73  * Sets the type name of this field. The syntax for a type name of a field
74  * corresponds to Type in Field Declaration (JLS2 8.3). Type names must be
75  * specified as they should appear in source code. For example:
76  * <code>"String"</code>, <code>"int[]"</code>, or <code>"java.io.File"</code>.
77  *
78  * @param typeName the type name
79  * @exception IllegalArgumentException if <code>null</code> is specified
80  */

81 public void setType(String JavaDoc typeName) throws IllegalArgumentException JavaDoc;
82 }
83
Popular Tags