1 15 package org.apache.hivemind.parse; 16 17 import java.util.ArrayList ; 18 import java.util.List ; 19 20 import org.apache.hivemind.util.ToStringBuilder; 21 22 29 public abstract class AbstractServiceDescriptor extends BaseAnnotationHolder 30 { 31 private InstanceBuilder _instanceBuilder; 32 private List _interceptors; 33 34 35 public String toString() 36 { 37 ToStringBuilder builder = new ToStringBuilder(this); 38 39 extendDescription(builder); 40 41 builder.append("instanceBuilder", _instanceBuilder); 42 builder.append("interceptors", _interceptors); 43 44 return builder.toString(); 45 } 46 47 50 protected abstract void extendDescription(ToStringBuilder builder); 51 52 public InstanceBuilder getInstanceBuilder() 53 { 54 return _instanceBuilder; 55 } 56 57 60 public void setInstanceBuilder(InstanceBuilder descriptor) 61 { 62 _instanceBuilder = descriptor; 63 } 64 65 public void addInterceptor(InterceptorDescriptor interceptor) 66 { 67 if (_interceptors == null) 68 _interceptors = new ArrayList (); 69 70 _interceptors.add(interceptor); 71 } 72 73 77 public List getInterceptors() 78 { 79 return _interceptors; 80 } 81 82 } 83 | Popular Tags |