1 26 package org.objectweb.util.explorer.resolver.lib; 27 28 import org.objectweb.fractal.api.NoSuchInterfaceException; 29 import org.objectweb.util.explorer.api.Entry; 30 import org.objectweb.util.explorer.core.common.api.Description; 31 import org.objectweb.util.explorer.core.common.lib.BindingFeature; 32 import org.objectweb.util.explorer.resolver.api.PropertyResolver; 33 34 42 public class PropertyResolverDispatcher 43 extends BindingFeature 44 implements PropertyResolver 45 { 46 47 53 59 65 71 protected PropertyResolver getPropertyResolver(String itfSuffixe){ 72 try { 73 return (PropertyResolver)lookupFc(PropertyResolver.PROPERTY_RESOLVER + "-collection-" + itfSuffixe); 74 } catch (NoSuchInterfaceException e) { 75 getTrace().info(PropertyResolver.PROPERTY_RESOLVER + "-collection-" + itfSuffixe + ": interface not found!"); 76 return null; 77 } 78 } 79 80 86 89 public String [] clientFc() { 90 return new String []{PropertyResolver.PROPERTY_RESOLVER + "-collection"}; 91 } 92 93 99 102 public Description resolve(String propertyType, Entry currentEntry, Entry parentEntry) { 103 PropertyResolver propertyResolver = getPropertyResolver(propertyType); 104 if (propertyResolver!=null){ 105 return propertyResolver.resolve(propertyType,currentEntry,parentEntry); 106 } 107 return null; 108 } 109 110 113 public Description resolve(String propertyType, Entry currentEntry) { 114 return resolve(propertyType, currentEntry, null); 115 } 116 117 } 118 119 120 | Popular Tags |