public String toString() { String mName = null; if (this.isUsingDefaultConstructor()) { mName = "<CONSTRUCTOR>"; } else { mName = this.getMethodName(); } return Helper.getShortClassName(this) + "(" + mName + ")"; }
/** * Build and return a new instance, using the appropriate mechanism. */ public Object buildNewInstance() throws DescriptorException { if (this.isUsingDefaultConstructor()) { return this.buildNewInstanceUsingDefaultConstructor(); } else { return this.buildNewInstanceUsingFactory(); } }
/** * If necessary, initialize the factory and the method. */ public void initialize(AbstractSession session) throws DescriptorException { if (this.isUsingDefaultConstructor()) { return; } try { // If the factory has been specified directly, do not overwrite it if (this.getFactory() == null) { this.setFactory(this.buildFactory()); } this.initializeMethod(); } catch (DescriptorException ex) { session.getIntegrityChecker().handleError(ex); } }