Source code: javax/ide/model/java/source/tree/BlockT.java
1 /*
2 * @(#)BlockT.java
3 */
4
5 package javax.ide.model.java.source.tree;
6
7 import java.util.Collection;
8 import java.util.List;
9
10 /**
11 * A code block. Blocks may be children of methods declarations,
12 * constructor declarations, class initializers, and statements. A
13 * block may contain any child that extends BlockElementT, in
14 * particular: ClassT, LocalVariableDeclT, StatementT,
15 * SwitchLabelT. <p/>
16 *
17 * @see BlockElementT
18 *
19 * @author Andy Yu
20 */
21 public interface BlockT
22 extends Tree
23 {
24 // ----------------------------------------------------------------------
25
26 /**
27 * Gets the list of block elements. The only difference between
28 * getBlockElements() and getChildren() is the type. Notice that
29 * getBlockElements() returns a List<BlockElementT> whereas getChildren
30 * returns a List<Tree>. <p/>
31 *
32 * @return The array of block elements within this block. Always
33 * non-null. Returns a collection of Tree's. <p/>
34 *
35 * List of BlockElementTs.
36 */
37 public List getBlockElements();
38
39 /**
40 * Gets the collection of local classes.
41 *
42 * @return The array of local classes. Returns a collection of
43 * ClassT's. <p/>
44 *
45 * Collection of ClassTs.
46 */
47 public Collection getLocalClasses();
48
49 /**
50 * Gets the collection of local variables.
51 *
52 * @return The array of local variables. Returns a collection of
53 * LocalVariableT's. <p/>
54 *
55 * List of LocalVariableTs.
56 */
57 public Collection getLocalVariables();
58
59
60 // ----------------------------------------------------------------------
61 }