1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.core.jdom;
14 * Represents an initializer. The corresponding syntactic
15 * units are InstanceInitializer (JLS2 8.6) and StaticDeclaration (JLS2 8.7).
16 * An initializer has no children and its parent is a type.
18 * This interface is not intended to be implemented by clients.
21 public interface IDOMInitializer extends IDOMMember {
23 * Returns the body of this initializer. The syntax for a body corresponds to
24 * InstanceInitializer (JLS2 8.6) and StaticDeclaration (JLS2 8.7).
26 * @return an initializer body, including braces, or <code>null</code> if
29 public String getBody();
31 * The <code>IDOMInitializer</code> refinement of this <code>IDOMNode</code>
32 * method returns <code>null</code>. An initializer does not have a name.
34 public String getName();
36 * Sets the body of this initializer. The syntax for a body corresponds to
37 * InstanceInitializer (JLS2 8.6) and StaticDeclaration (JLS2 8.7). No formatting
38 * or syntax checking is performed on the body. Braces <b>must</b> be included.
40 * @param body an initializer body, including braces, or <code>null</code>
43 public void setBody(String body);
45 * The <code>IDOMInitializer</code> refinement of this <code>IDOMNode</code>
46 * method does nothing.
48 public void setName(String name);