KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > incava > java > ThrowsUtil


1 package org.incava.java;
2
3 import java.util.*;
4 import net.sourceforge.pmd.ast.*;
5
6
7 /**
8  * Miscellaneous routines for throws lists.
9  */

10 public class ThrowsUtil extends SimpleNodeUtil
11 {
12     public static ASTName[] getNames(ASTNameList names)
13     {
14         return (ASTName[])findChildren(names, ASTName.class);
15     }
16
17     public static String JavaDoc getName(ASTNameList names, int index)
18     {
19         ASTName name = (ASTName)findChild(names, ASTName.class, index);
20         return name == null ? null : toString(name);
21     }
22
23     public static ASTName getNameNode(ASTNameList names, int index)
24     {
25         return (ASTName)findChild(names, ASTName.class, index);
26     }
27 }
28
Popular Tags