/** * Qualifies the given <code>fileName</code> with the given <code>packageName</code> and returns * the resulting file path.<br> * If <code>packageName</code> is <code>null</code> or a zero-length String, this method will * return <code>fileName</code>.<br> * * @param fileName The file name to be qualified. * @param packageName The package name to be used for qualifying. * @return The qualified file path. */ @Override public final String getQualifiedFileName(final String fileName, final String packageName) { if ((packageName == null) || (packageName.length() == 0)) { return fileName; } return new StringBuilder().append(packageToPath(packageName)).append('/').append(fileName) .toString(); }
/** * Qualifies the given <code>fileName</code> with the given * <code>packageName</code> and returns the resulting file path.<br> * If <code>packageName</code> is <code>null</code> or a zero-length * String, this method will return <code>fileName</code>.<br> * * @param fileName * The file name to be qualified. * @param packageName * The package name to be used for qualifying. * @return The qualified file path. * @see org.castor.xml.JavaNaming#getQualifiedFileName(java.lang.String,java.lang.String) */ public final String getQualifiedFileName(final String fileName, final String packageName) { if ((packageName == null) || (packageName.length() == 0)) { return fileName; } StringBuffer result = new StringBuffer(); result.append(packageToPath(packageName)); result.append('/'); result.append(fileName); return result.toString(); } // -- getQualifiedFileName