/** * <p>Gets the package name from the canonical name of a <code>Class</code>.</p> * * @param cls the class to get the package name for, may be <code>null</code>. * @return the package name or an empty string * @since 2.4 */ public static String getPackageCanonicalName(Class cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageCanonicalName(cls.getName()); }
/** * <p>Gets the package name from the canonical name of an <code>Object</code>.</p> * * @param object the class to get the package name for, may be null * @param valueIfNull the value to return if null * @return the package name of the object, or the null value * @since 2.4 */ public static String getPackageCanonicalName(Object object, String valueIfNull) { if (object == null) { return valueIfNull; } return getPackageCanonicalName(object.getClass().getName()); }
/** * <p>Gets the package name from the canonical name of a <code>Class</code>.</p> * * @param cls the class to get the package name for, may be <code>null</code>. * @return the package name or an empty string * @since 2.4 */ public static String getPackageCanonicalName(Class cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageCanonicalName(cls.getName()); }
/** * <p>Gets the package name from the canonical name of a <code>Class</code>.</p> * * @param cls the class to get the package name for, may be <code>null</code>. * @return the package name or an empty string * @since 2.4 */ public static String getPackageCanonicalName(Class cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageCanonicalName(cls.getName()); }
/** * <p>Gets the package name from the canonical name of a <code>Class</code>.</p> * * @param cls the class to get the package name for, may be <code>null</code>. * @return the package name or an empty string * @since 2.4 */ public static String getPackageCanonicalName(Class cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageCanonicalName(cls.getName()); }
/** * <p>Gets the package name from the canonical name of a <code>Class</code>.</p> * * @param cls the class to get the package name for, may be <code>null</code>. * @return the package name or an empty string * @since 2.4 */ public static String getPackageCanonicalName(Class cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageCanonicalName(cls.getName()); }
/** * <p>Gets the package name from the canonical name of a <code>Class</code>.</p> * * @param cls the class to get the package name for, may be <code>null</code>. * @return the package name or an empty string * @since 2.4 */ public static String getPackageCanonicalName(Class cls) { if (cls == null) { return StringUtils.EMPTY; } return getPackageCanonicalName(cls.getName()); }
/** * <p>Gets the package name from the canonical name of an <code>Object</code>.</p> * * @param object the class to get the package name for, may be null * @param valueIfNull the value to return if null * @return the package name of the object, or the null value * @since 2.4 */ public static String getPackageCanonicalName(Object object, String valueIfNull) { if (object == null) { return valueIfNull; } return getPackageCanonicalName(object.getClass().getName()); }
/** * <p>Gets the package name from the canonical name of an <code>Object</code>.</p> * * @param object the class to get the package name for, may be null * @param valueIfNull the value to return if null * @return the package name of the object, or the null value * @since 2.4 */ public static String getPackageCanonicalName(Object object, String valueIfNull) { if (object == null) { return valueIfNull; } return getPackageCanonicalName(object.getClass().getName()); }
/** * <p>Gets the package name from the canonical name of an <code>Object</code>.</p> * * @param object the class to get the package name for, may be null * @param valueIfNull the value to return if null * @return the package name of the object, or the null value * @since 2.4 */ public static String getPackageCanonicalName(Object object, String valueIfNull) { if (object == null) { return valueIfNull; } return getPackageCanonicalName(object.getClass().getName()); }
/** * <p>Gets the package name from the canonical name of an <code>Object</code>.</p> * * @param object the class to get the package name for, may be null * @param valueIfNull the value to return if null * @return the package name of the object, or the null value * @since 2.4 */ public static String getPackageCanonicalName(Object object, String valueIfNull) { if (object == null) { return valueIfNull; } return getPackageCanonicalName(object.getClass().getName()); }
/** * <p>Gets the package name from the canonical name of an <code>Object</code>.</p> * * @param object the class to get the package name for, may be null * @param valueIfNull the value to return if null * @return the package name of the object, or the null value * @since 2.4 */ public static String getPackageCanonicalName(Object object, String valueIfNull) { if (object == null) { return valueIfNull; } return getPackageCanonicalName(object.getClass().getName()); }