Interface SourceCodeParser
public interface SourceCodeParser
Interface for a parser of Java source code.
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Method Summary
-
Method Details
-
parseType
- Parameters:
reader- theReaderwith the source-code (e.g. from*.javafile).file- theBaseFilewhere to add theelementsfrom the parsed source-code. In case anelementalready exists, it shall be merged with the information from the source-code. Otherwise it will be created.- Returns:
- the
main type(e.g. whenFoo.javawas parsed, this should be the top-level typeFoo). The canonicalsimple namefor that type can be determined viaBaseElementWithQualifiedName.getSimpleName(). In case of "odd" Java source-code where no such canonical type exists, the first top-levelBaseTypeshould be returned. If the source-code is entirely odd and no (valid) type is present at all, thennullmay be returned.
-
parsePackage
- Parameters:
reader- theReaderwith the source-code (e.g. frompackage-info.javafile).pkg- theBasePackagewhere to adddoc,annotations, andcommentsfrom the source-code.
-