1 2 3 24 package com.geinuke.module; 25 26 import java.util.Hashtable ; 27 28 public class ModuleWrapper { 29 protected String desc=null; 30 protected String name=null; 31 protected Hashtable widgets=null; 32 protected Hashtable pages=null; 33 public ModuleWrapper(){ 34 this.pages=new Hashtable (); 35 this.widgets=new Hashtable (); 36 } 37 38 public void put(String op,String page,Object o){ 39 this.pages.put(op,page); 40 this.widgets.put(op,o); 41 42 } 43 44 public Object getObject(String op){ 45 46 Object o=null; 47 try{ 48 o=Class.forName( (String )this.widgets.get(op) ).newInstance(); 49 }catch(Exception e){ 50 e.printStackTrace(); 51 } 52 53 return o; 54 55 } 56 57 public String getPage(String op){ 58 return (String )this.pages.get(op); 59 } 60 61 62 public String getDesc() { 63 return desc; 64 } 65 public void setDesc(String desc) { 66 this.desc = desc; 67 } 68 public String getName() { 69 return name; 70 } 71 public void setName(String name) { 72 this.name = name; 73 } 74 } 75 | Popular Tags |