1 package org.sapia.util.xml.confix.test; 2 3 import java.util.ArrayList ; 6 import java.util.List ; 7 8 import org.sapia.util.xml.confix.ObjectHandlerIF; 9 10 21 public class Config implements ObjectHandlerIF { 22 23 private String _theName; 24 private ArrayList _theNamedValues; 25 private Object [] _theCustomObject; 26 27 public Config() { 28 _theNamedValues = new ArrayList (); 29 _theCustomObject = new Object [2]; 30 } 31 32 public String getName() { 33 return _theName; 34 } 35 36 public List getNamedValues() { 37 return _theNamedValues; 38 } 39 40 public void setName(String aName) { 41 _theName = aName; 42 } 43 44 public void addWrappedNamedValue(WrappedNamedValue aWrapper) { 45 _theNamedValues.add(aWrapper.getNamedValue()); 46 } 47 48 public void addNamedValue(NamedValue aNamedValue) { 49 _theNamedValues.add(aNamedValue); 50 } 51 52 public NamedValue createParam() { 53 NamedValue aNamedValue = new NamedValue(); 54 _theNamedValues.add(aNamedValue); 55 return aNamedValue; 56 } 57 58 public void setParam(NamedValue aNamedValue) { 59 _theNamedValues.add(aNamedValue); 60 } 61 62 public Object [] getCustomObject() { 63 return _theCustomObject; 64 } 65 66 72 public void handleObject(String anElementName, Object anObject) { 73 _theCustomObject[0] = anElementName; 74 _theCustomObject[1] = anObject; 75 } 76 } 77 | Popular Tags |