question: public static @ DottedClassName String extractPackageName ( @ DottedClassName String className ) { int i = className . lastIndexOf ( '.' ) ; if ( i < 0 ) { return "" ; } return className . substring ( 0 , i ) ; }
target:  extract the package name from a dotted class name. Package names are always in dotted format.