1 19 20 package org.netbeans.upgrade.systemoptions; 21 22 import java.util.Iterator ; 23 import java.util.List ; 24 25 28 class FileProcessor extends PropertyProcessor { 29 FileProcessor() { 30 super("java.io.File"); } 32 33 void processPropertyImpl(String propertyName, Object value) { 34 StringBuffer sb = new StringBuffer (); 35 if ("antHome".equals(propertyName) || "projectsFolder".equals(propertyName)) { List l = ((SerParser.ObjectWrapper)value).data; 37 for (Iterator it = l.iterator(); it.hasNext();) { 38 Object elem = (Object ) it.next(); 39 if (elem instanceof SerParser.NameValue) { 40 SerParser.NameValue nv = (SerParser.NameValue)elem; 41 if (nv.value != null && nv.name != null) { 42 if (nv.name.name.equals("path")) { addProperty(propertyName,nv.value.toString()); } 45 } 46 } 47 } 48 } else { 49 throw new IllegalStateException (); 50 } 51 } 52 } 53 | Popular Tags |