1 23 24 package com.sun.enterprise.tools.verifier.web; 25 26 import org.w3c.dom.NodeList ; 27 import org.w3c.dom.Node ; 28 29 32 public class FunctionDescriptor { 33 Node node; 34 public FunctionDescriptor(Node n){ 35 this.node = n; 36 } 37 38 public String getFunctionClass(){ 39 NodeList n1 = node.getChildNodes(); 40 int i = 0; 41 String className = null; 42 for (int k = 0; k < n1.getLength(); k++) { 43 String name = n1.item(k).getNodeName(); 44 if (name == "function-class") { className = n1.item(k).getFirstChild().getNodeValue(); 46 } 47 } 48 return className; 49 } 50 51 public String getFunctionSignature() { 52 NodeList n1 = node.getChildNodes(); 53 int i = 0; 54 String signature = null; 55 for (int k = 0; k < n1.getLength(); k++) { 56 String name = n1.item(k).getNodeName(); 57 if (name == "function-signature") signature = n1.item(k).getFirstChild().getNodeValue(); 59 } 60 return signature; 61 } 62 63 } 64 | Popular Tags |