/** * If no method name is specified, they we have to use the default (zero-argument) constructor. */ public boolean isUsingDefaultConstructor() { return this.getMethodName() == null; }
/** * If no method name is specified, they we have to use the default (zero-argument) constructor. */ public boolean isUsingDefaultConstructor() { return this.getMethodName() == null; }
/** * If no method name is specified, they we have to use the default (zero-argument) constructor. */ public boolean isUsingDefaultConstructor() { return this.getMethodName() == null; }
@Override public String toString() { String mName = null; if (this.isUsingDefaultConstructor()) { mName = "<CONSTRUCTOR>"; } else { mName = this.getMethodName(); } return Helper.getShortClassName(this) + "(" + mName + ")"; }
public String toString() { String mName = null; if (this.isUsingDefaultConstructor()) { mName = "<CONSTRUCTOR>"; } else { mName = this.getMethodName(); } return Helper.getShortClassName(this) + "(" + mName + ")"; }
public String toString() { String mName = null; if (this.isUsingDefaultConstructor()) { mName = "<CONSTRUCTOR>"; } else { mName = this.getMethodName(); } return Helper.getShortClassName(this) + "(" + mName + ")"; }
this.factoryClassName = defaultInstantiationPolicy.getFactoryClassName(); this.factoryClass = defaultInstantiationPolicy.getFactoryClass(); this.methodName = defaultInstantiationPolicy.getMethodName();
/** * Initialize the method. * It is either a static on the descriptor class, or it is a non-static on the factory. */ protected void initializeMethod() throws DescriptorException { Class tempClass; if (this.getFactory() == null) { tempClass = this.getDescriptor().getJavaClass(); } else { tempClass = this.getFactory().getClass(); } this.setMethod(this.buildMethod(tempClass, this.getMethodName(), new Class[0])); }
/** * Initialize the method. * It is either a static on the descriptor class, or it is a non-static on the factory. */ protected void initializeMethod() throws DescriptorException { Class tempClass; if (this.getFactory() != null) { tempClass = this.getFactory().getClass(); } else if (this.getFactoryClass() == null) { tempClass = this.getDescriptor().getJavaClass(); } else { tempClass = this.getFactoryClass(); } this.setMethod(this.buildMethod(tempClass, this.getMethodName(), new Class[0])); }
/** * Initialize the method. * It is either a static on the descriptor class, or it is a non-static on the factory. */ protected void initializeMethod() throws DescriptorException { Class tempClass; if (this.getFactory() != null) { tempClass = this.getFactory().getClass(); } else if (this.getFactoryClass() == null) { tempClass = this.getDescriptor().getJavaClass(); } else { tempClass = this.getFactoryClass(); } this.setMethod(this.buildMethod(tempClass, this.getMethodName(), new Class[0])); }
if (descriptor.getInstantiationPolicy().getFactoryClassName() != null) { if (descriptor.getInstantiationPolicy().getFactoryMethodName() != null) { method.addLine("descriptor.useFactoryInstantiationPolicy(" + descriptor.getInstantiationPolicy().getFactoryClassName() + ".class, \"" + descriptor.getInstantiationPolicy().getMethodName() + "\", \"" + descriptor.getInstantiationPolicy().getFactoryMethodName() + "\");"); } else { method.addLine("descriptor.useFactoryInstantiationPolicy(" + descriptor.getInstantiationPolicy().getFactoryClassName() + ".class, \"" + descriptor.getInstantiationPolicy().getMethodName() + "\");"); method.addLine("descriptor.useMethodInstantiationPolicy(\"" + descriptor.getInstantiationPolicy().getMethodName() + "\");");
if (descriptor.getInstantiationPolicy().getFactoryClassName() != null) { if (descriptor.getInstantiationPolicy().getFactoryMethodName() != null) { method.addLine("descriptor.useFactoryInstantiationPolicy(" + descriptor.getInstantiationPolicy().getFactoryClassName() + ".class, \"" + descriptor.getInstantiationPolicy().getMethodName() + "\", \"" + descriptor.getInstantiationPolicy().getFactoryMethodName() + "\");"); } else { method.addLine("descriptor.useFactoryInstantiationPolicy(" + descriptor.getInstantiationPolicy().getFactoryClassName() + ".class, \"" + descriptor.getInstantiationPolicy().getMethodName() + "\");"); method.addLine("descriptor.useMethodInstantiationPolicy(\"" + descriptor.getInstantiationPolicy().getMethodName() + "\");");
if (descriptor.getInstantiationPolicy().getFactoryClassName() != null) { if (descriptor.getInstantiationPolicy().getFactoryMethodName() != null) { method.addLine("descriptor.useFactoryInstantiationPolicy(" + descriptor.getInstantiationPolicy().getFactoryClassName() + ".class, \"" + descriptor.getInstantiationPolicy().getMethodName() + "\", \"" + descriptor.getInstantiationPolicy().getFactoryMethodName() + "\");"); } else { method.addLine("descriptor.useFactoryInstantiationPolicy(" + descriptor.getInstantiationPolicy().getFactoryClassName() + ".class, \"" + descriptor.getInstantiationPolicy().getMethodName() + "\");"); method.addLine("descriptor.useMethodInstantiationPolicy(\"" + descriptor.getInstantiationPolicy().getMethodName() + "\");");