1 15 package org.apache.hivemind.parse; 16 17 import org.apache.hivemind.definition.ImplementationConstructor; 18 import org.apache.hivemind.impl.BaseLocatable; 19 import org.apache.hivemind.impl.CreateClassServiceConstructor; 20 import org.apache.hivemind.util.ToStringBuilder; 21 22 28 public final class CreateInstanceDescriptor extends BaseLocatable implements InstanceBuilder 29 { 30 private String _serviceModel = "singleton"; 31 private String _instanceClassName; 32 33 public String getInstanceClassName() 34 { 35 return _instanceClassName; 36 } 37 38 public void setInstanceClassName(String string) 39 { 40 _instanceClassName = string; 41 } 42 43 public ImplementationConstructor createConstructor( 44 String contributingModuleId) 45 { 46 CreateClassServiceConstructor result = new CreateClassServiceConstructor( 47 getLocation(), _instanceClassName); 48 49 return result; 50 } 51 52 public String toString() 53 { 54 ToStringBuilder builder = new ToStringBuilder(this); 55 56 builder.append("instanceClassName", _instanceClassName); 57 builder.append("serviceModel", _serviceModel); 58 59 return builder.toString(); 60 } 61 62 public String getServiceModel() 63 { 64 return _serviceModel; 65 } 66 67 public void setServiceModel(String serviceModel) 68 { 69 _serviceModel = serviceModel; 70 } 71 72 } 73 | Popular Tags |