/** * Convert a package name to a relative directory name. * * @param sPackage * The name of the package to be converted. May not be * <code>null</code>. * @return The directory name using forward slashes (/) instead of the dots. */ @Nonnull public static String getDirectoryFromPackage (@Nonnull final String sPackage) { // No differentiation return getPathFromClass (sPackage); }
/** * Convert a package name to a relative directory name. * * @param aPackage * The package to be converted. May not be <code>null</code>. * @return The directory name using forward slashes (/) instead of the dots. */ @Nonnull public static String getDirectoryFromPackage (@Nonnull final Package aPackage) { ValueEnforcer.notNull (aPackage, "Package"); // No differentiation return getPathFromClass (aPackage.getName ()); }
/** * Get the path representation of the passed class. The path representation is * achieved by replacing all dots (.) with forward slashes (/) in the class * name. * * @param aClass * The class of which the path is to be retrieved. May not be * <code>null</code>. * @return The path representation. Never <code>null</code>. */ @Nonnull public static String getPathFromClass (@Nonnull final Class <?> aClass) { ValueEnforcer.notNull (aClass, "Class"); return getPathFromClass (aClass.getName ()); }