1 26 package org.objectweb.util.explorer.parser.lib; 27 28 import org.objectweb.fractal.api.NoSuchInterfaceException; 29 import org.objectweb.util.explorer.core.code.api.CodeProvider; 30 import org.objectweb.util.explorer.core.common.lib.BindingFeature; 31 import org.objectweb.util.explorer.explorerConfig.Node; 32 import org.objectweb.util.explorer.parser.api.NodeParser; 33 import org.objectweb.util.explorer.property.api.PropertyFeeder; 34 35 43 public abstract class AbstractNodeParser 44 extends BindingFeature 45 implements NodeParser 46 { 47 48 54 55 protected PropertyFeeder feeder_ = null; 56 57 58 protected CodeProvider codeProvider_ = null; 59 60 66 72 77 protected PropertyFeeder getFeeder(){ 78 if(feeder_==null) { 79 try { 80 feeder_ = (PropertyFeeder)lookupFc(PropertyFeeder.PROPERTY_FEEDER); 81 } catch (NoSuchInterfaceException e) { 82 getTrace().warn(PropertyFeeder.PROPERTY_FEEDER + ": Interface not found!"); 83 } 84 } 85 return feeder_; 86 } 87 88 93 protected CodeProvider getCodeProvider(){ 94 if(codeProvider_==null) { 95 try { 96 codeProvider_ = (CodeProvider)lookupFc(CodeProvider.CODE_PROVIDER); 97 } catch (NoSuchInterfaceException e) { 98 getTrace().warn(CodeProvider.CODE_PROVIDER + ": Interface not found!"); 99 } 100 } 101 return codeProvider_; 102 } 103 104 110 113 public String [] clientFc() { 114 return new String []{PropertyFeeder.PROPERTY_FEEDER, CodeProvider.CODE_PROVIDER}; 115 } 116 117 123 126 public abstract void parseNode(Object key, Node node); 127 128 } 129 130 131 | Popular Tags |