/** {@inheritDoc} */ public synchronized Output getInstance(Input input) { Output output = get(input); if (output != null) { log.trace("Input key mapped to a non-null value, returning output"); return output; } else { log.trace("Input key mapped to a null value"); } log.trace("Creating new output instance and inserting to factory map"); output = createNewInstance(input); if (output == null) { log.error("New output instance was not created"); return null; } put(input, output); return output; }
/** * Obtain an instance of the output class based on an input class instance. * * @param input the input class instance * @return an output class instance */ public synchronized Output getInstance(Input input) { Output output = super.getInstance(input); if (explicitRelease && output != null) { log.trace("Explicit release was indicated, registering output instance to inhibit garbage collection"); register(output); } return output; }
/** * Obtain an instance of the output class based on an input class instance. * * @param input the input class instance * @return an output class instance */ public synchronized Output getInstance(Input input) { Output output = super.getInstance(input); if (explicitRelease && output != null) { log.trace("Explicit release was indicated, registering output instance to inhibit garbage collection"); register(output); } return output; }
/** {@inheritDoc} */ public synchronized Output getInstance(Input input) { Output output = get(input); if (output != null) { log.trace("Input key mapped to a non-null value, returning output"); return output; } else { log.trace("Input key mapped to a null value"); } log.trace("Creating new output instance and inserting to factory map"); output = createNewInstance(input); if (output == null) { log.error("New output instance was not created"); return null; } put(input, output); return output; }