comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ChildNodeTest.java @ 7530:5e3d1a68664e

applied mx eclipseformat to all Java files
author Doug Simon <doug.simon@oracle.com>
date Wed, 23 Jan 2013 16:34:57 +0100
parents a4b84ba6dc2e
children df1d665ca846
comparison
equal deleted inserted replaced
7529:4a11124a3563 7530:5e3d1a68664e
31 import com.oracle.truffle.api.nodes.*; 31 import com.oracle.truffle.api.nodes.*;
32 import com.oracle.truffle.api.nodes.Node.Child; 32 import com.oracle.truffle.api.nodes.Node.Child;
33 33
34 /** 34 /**
35 * <h3>Creating a Child Node</h3> 35 * <h3>Creating a Child Node</h3>
36 * 36 *
37 * <p> 37 * <p>
38 * Child nodes are stored in the class of the parent node in fields that are marked with the {@link Child} annotation. 38 * Child nodes are stored in the class of the parent node in fields that are marked with the
39 * Before such a field is assigned, {@link Node#adoptChild} must be called. This method automatically establishes a link 39 * {@link Child} annotation. Before such a field is assigned, {@link Node#adoptChild} must be
40 * from the child to the parent. The {@link Node#getParent()} method allows access to this field. Every node also 40 * called. This method automatically establishes a link from the child to the parent. The
41 * provides the ability to iterate over its children using {@link Node#getChildren()}.</p> 41 * {@link Node#getParent()} method allows access to this field. Every node also provides the ability
42 * 42 * to iterate over its children using {@link Node#getChildren()}.
43 * <p>A child node field must be declared private and non-final. It may only be assigned in the constructor of the parent
44 * node. For changing the structure of the tree at run time, the method {@link Node#replace(Node)} must be used (see
45 * {@link ReplaceTest}).
46 * </p> 43 * </p>
47 * 44 *
48 * <p> 45 * <p>
49 * The next part of the Truffle API introduction is at {@link com.oracle.truffle.api.test.ChildrenNodesTest}. 46 * A child node field must be declared private and non-final. It may only be assigned in the
47 * constructor of the parent node. For changing the structure of the tree at run time, the method
48 * {@link Node#replace(Node)} must be used (see {@link ReplaceTest}).
49 * </p>
50 *
51 * <p>
52 * The next part of the Truffle API introduction is at
53 * {@link com.oracle.truffle.api.test.ChildrenNodesTest}.
50 * </p> 54 * </p>
51 */ 55 */
52 public class ChildNodeTest { 56 public class ChildNodeTest {
53 57
54 @Test 58 @Test