1 26 package org.objectweb.util.explorer.property.lib; 27 28 import java.util.HashMap ; 29 import java.util.Map ; 30 31 import org.objectweb.fractal.api.NoSuchInterfaceException; 32 import org.objectweb.util.explorer.core.code.api.CodeProvider; 33 import org.objectweb.util.explorer.core.common.api.Description; 34 import org.objectweb.util.explorer.core.common.lib.BindingFeature; 35 import org.objectweb.util.explorer.property.api.PropertyFeeder; 36 import org.objectweb.util.explorer.property.api.PropertyProvider; 37 38 46 public abstract class AbstractProperty 47 extends BindingFeature 48 implements PropertyFeeder, PropertyProvider 49 { 50 51 57 58 protected CodeProvider codeProvider_ = null; 59 60 61 protected Map properties_ = null; 62 63 69 protected AbstractProperty(){ 70 properties_ = new HashMap (); 71 } 72 73 79 82 protected CodeProvider getCodeProvider(){ 83 if(codeProvider_==null){ 84 try { 85 codeProvider_ = (CodeProvider)lookupFc(CodeProvider.CODE_PROVIDER); 86 } catch (NoSuchInterfaceException e) { 87 getTrace().warn(CodeProvider.CODE_PROVIDER); 88 } 89 } 90 return codeProvider_; 91 } 92 93 99 102 public String [] clientFc() { 103 return new String []{CodeProvider.CODE_PROVIDER}; 104 } 105 106 112 115 public abstract void feed(String propertyType, Object key, Description value); 116 117 123 126 public abstract Description getPropertyDescription(String propertyType, Object key); 127 128 } 129 | Popular Tags |