def ClassDoc(path):
 try:
  from com.sun.tools.javadoc import JavadocTool, Messager, ModifierFilter
  from com.sun.tools.javac.util import List, Context
  from com.sun.tools.javac.code.Flags import PUBLIC
 except ImportError:
  raise DataError("Creating documentation from Java source files requires 'tools.jar' to be in CLASSPATH.")
 context = Context()
 Messager.preRegister(context, 'libdoc')
 jdoctool = JavadocTool.make0(context)
 filter = ModifierFilter(PUBLIC)
 java_names = List.of(path)
 if (sys.platform[4:7] < '1.8'):
  root = jdoctool.getRootDocImpl('en', 'utf-8', filter, java_names, List.nil(), False, List.nil(), List.nil(), False, False, True)
 else:
  root = jdoctool.getRootDocImpl('en', 'utf-8', filter, java_names, List.nil(), List.nil(), False, List.nil(), List.nil(), False, False, True)
 return root.classes()[0]

def ClassDoc ( path ) : try : from com . sun . tools . javadoc import JavadocTool , Messager , ModifierFilter from com . sun . tools . javac . util import List , Context from com . sun . tools . javac . code . Flags import PUBLIC except ImportError : raise DataError ( "Creating documentation from Java source files requires 'tools.jar' to be in CLASSPATH." ) context = Context ( ) Messager . preRegister ( context , 'libdoc' ) jdoctool = JavadocTool . make0 ( context ) filter = ModifierFilter ( PUBLIC ) java_names = List . of ( path ) if ( sys . platform [ 4 : 7 ] < '1.8' ) : root = jdoctool . getRootDocImpl ( 'en' , 'utf-8' , filter , java_names , List . nil ( ) , False , List . nil ( ) , List . nil ( ) , False , False , True ) else : root = jdoctool . getRootDocImpl ( 'en' , 'utf-8' , filter , java_names , List . nil ( ) , List . nil ( ) , False , List . nil ( ) , List . nil ( ) , False , False , True ) return root . classes ( ) [ 0 ]
process the given java source file and return classdoc instance .