code: private String getLastPackageName (final String name)
    {
      if (name != null)
      {
        return name.substring (name.lastIndexOf ('.') + 1);
      }
      return null;
    }
docs: Gets the last identifier from the specified package name. For example,
  returns "apache" upon input of "org.apache". JTB uses this approach to
  derive the output directories for the visitor and syntax tree files.
  
  @param name
  The package name from which to retrieve the last sub package, may be
  <code>null</code>.
  @return The name of the last sub package or <code>null</code> if the input
  was <code>null</code>