01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.core.jdom;
11:
12: /**
13: * Represents an initializer. The corresponding syntactic
14: * units are InstanceInitializer (JLS2 8.6) and StaticDeclaration (JLS2 8.7).
15: * An initializer has no children and its parent is a type.
16: * <p>
17: * This interface is not intended to be implemented by clients.
18: * </p>
19: * @deprecated The JDOM was made obsolete by the addition in 2.0 of the more
20: * powerful, fine-grained DOM/AST API found in the
21: * org.eclipse.jdt.core.dom package.
22: */
23: public interface IDOMInitializer extends IDOMMember {
24: /**
25: * Returns the body of this initializer. The syntax for a body corresponds to
26: * InstanceInitializer (JLS2 8.6) and StaticDeclaration (JLS2 8.7).
27: *
28: * @return an initializer body, including braces, or <code>null</code> if
29: * no body is present
30: */
31: public String getBody();
32:
33: /**
34: * The <code>IDOMInitializer</code> refinement of this <code>IDOMNode</code>
35: * method returns <code>null</code>. An initializer does not have a name.
36: *
37: * @return <code>null</code>
38: */
39: public String getName();
40:
41: /**
42: * Sets the body of this initializer. The syntax for a body corresponds to
43: * InstanceInitializer (JLS2 8.6) and StaticDeclaration (JLS2 8.7). No formatting
44: * or syntax checking is performed on the body. Braces <b>must</b> be included.
45: *
46: * @param body an initializer body, including braces, or <code>null</code>
47: * indicating no body
48: */
49: public void setBody(String body);
50:
51: /**
52: * The <code>IDOMInitializer</code> refinement of this <code>IDOMNode</code>
53: * method does nothing.
54: *
55: * @param name the given name
56: */
57: public void setName(String name);
58: }
|