Package licensechecker :: Module commentextractor :: Class CommentExtractor
[hide private]
[frames] | no frames]

Class CommentExtractor

source code

Class taking care of the extraction of the initial comment block in source files.

Instance Methods [hide private]
 
__init__(self, fd, commentinfo)
Builds a new instance of CommentExtractor.
source code
CommentHeader
getCommentHeader(self)
Returns a comment header if found.
source code
Class Variables [hide private]
  __logger = logging.getLogger('lichk')
Method Details [hide private]

__init__(self, fd, commentinfo)
(Constructor)

source code 

Builds a new instance of CommentExtractor.

Parameters:
  • fd - a file object from which content will be read.
  • commentinfo - a CommentInfo object defining how line and block comments are delimited in this file.

getCommentHeader(self)

source code 

Returns a comment header if found.

Returns: CommentHeader
an instance of CommentHeader with the information about the comment header block, or None if no such block was found.