src/org/kocakosm/pitaya/util/Classes.java
public static String getPackageName(Class<?> c)
	{
		String name = c.getName();
		int i = name.lastIndexOf('.');
		return i != -1 ? name.substring(0, i) : "";
	}
public static String getPackageName(Class<?> c)
	{
		String name = c.getName();
		int i = name.lastIndexOf('.');
		return i != -1 ? name.substring(0, i) : "";
	}
public static String getPackageName ( Class < ? > c ) { String name = c . getName ( ) ; int i = name . lastIndexOf ( ' ' ) ; return i != - 1 ? name . substring ( 0 , i ) : "" ; }
Returns the name of the package of the given class or the empty
{@code String} if the class is defined in the default package.

@param c the class.

@return the package name of the given class.

@throws NullPointerException if {@code c} is {@code null}.
Returns the name of the package of the given class or the empty { @code String } if the class is defined in the default package .