打字猴:1.70048538e+09
1700485380
1700485381 return actionName;
1700485382
1700485383 }
1700485384
1700485385 public String getActionClass(){
1700485386
1700485387 return actionClass;
1700485388
1700485389 }
1700485390
1700485391 public String getMethodName(){
1700485392
1700485393 return methodName;
1700485394
1700485395 }
1700485396
1700485397 public abstract String getView(String Result);
1700485398
1700485399 }
1700485400
1700485401 它是一个抽象类,其中的getView是一个抽象方法,是根据执行结果查找到视图路径。只要编写一个适配器就可以把Elemet对象转为Action节点,如代码清单38-28所示。
1700485402
1700485403 代码清单38-28 Action节点
1700485404
1700485405 public class XmlActionNode extends ActionNode{
1700485406
1700485407 //需要转换的element
1700485408
1700485409 private Element el;
1700485410
1700485411 //通过构造函数传递
1700485412
1700485413 public XmlActionNode(Element_el){
1700485414
1700485415 this.el=_el;
1700485416
1700485417 }
1700485418
1700485419 @Override
1700485420
1700485421 public String getActionName(){
1700485422
1700485423 return getAttValue(“name”);
1700485424
1700485425 }
1700485426
1700485427 @Override
1700485428
1700485429 public String getActionClass(){
[ 上一页 ]  [ :1.70048538e+09 ]  [ 下一页 ]