1 package org.apache.tapestry.services.impl; 2 3 import org.apache.hivemind.ClassResolver; 4 import org.apache.tapestry.TapestryUtils; 5 import org.apache.tapestry.services.ClassFinder; 6 7 13 public class ClassFinderImpl implements ClassFinder 14 { 15 private ClassResolver _classResolver; 16 17 public Class findClass(String packageList, String className) 18 { 19 String [] packages = TapestryUtils.split(packageList); 20 21 for (int i = 0; i < packages.length; i++) 22 { 23 String fullName = packages[i].trim() + "." + className; 24 25 Class result = _classResolver.checkForClass(fullName); 26 27 if (result != null) 28 return result; 29 } 30 31 return _classResolver.checkForClass(className); 32 } 33 34 public void setClassResolver(ClassResolver classResolver) 35 { 36 _classResolver = classResolver; 37 } 38 39 } 40 | Popular Tags |