Public Member Functions | Public Attributes | List of all members
ros_introspection.source_code_file.SourceCodeFile Class Reference

Public Member Functions

def __init__ (self, rel_fn, file_path)
 
def __lt__ (self, other)
 
def __repr__ (self)
 
def get_contents (self)
 
def get_dependencies (self)
 
def get_external_python_dependencies (self)
 
def get_import_packages (self)
 
def is_executable (self)
 
def modify_with_patterns (self, patterns, verbose)
 
def replace_contents (self, contents)
 
def search_for_patterns (self, patterns)
 
def search_lines_for_pattern (self, pattern)
 
def search_lines_for_patterns (self, patterns)
 
def write (self)
 

Public Attributes

 changed_contents
 
 file_path
 
 language
 
 lines
 
 rel_fn
 
 tags
 

Detailed Description

Definition at line 20 of file source_code_file.py.

Constructor & Destructor Documentation

def ros_introspection.source_code_file.SourceCodeFile.__init__ (   self,
  rel_fn,
  file_path 
)

Definition at line 21 of file source_code_file.py.

Member Function Documentation

def ros_introspection.source_code_file.SourceCodeFile.__lt__ (   self,
  other 
)

Definition at line 127 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.__repr__ (   self)

Definition at line 130 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.get_contents (   self)

Definition at line 37 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.get_dependencies (   self)

Definition at line 106 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.get_external_python_dependencies (   self)

Definition at line 113 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.get_import_packages (   self)

Definition at line 98 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.is_executable (   self)

Definition at line 124 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.modify_with_patterns (   self,
  patterns,
  verbose 
)
Given a map of patterns, replace all instances in the source code.

The key in the map (needle) is a regular expression string literal.
If there are no groups, then the matching string is replaced with the map value.
If there are groups, then the literals of the form $0, $1, etc in the map value are replaced with the groups

Definition at line 69 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.replace_contents (   self,
  contents 
)

Definition at line 42 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.search_for_patterns (   self,
  patterns 
)

Definition at line 50 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.search_lines_for_pattern (   self,
  pattern 
)

Definition at line 66 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.search_lines_for_patterns (   self,
  patterns 
)

Definition at line 57 of file source_code_file.py.

def ros_introspection.source_code_file.SourceCodeFile.write (   self)

Definition at line 134 of file source_code_file.py.

Member Data Documentation

ros_introspection.source_code_file.SourceCodeFile.changed_contents

Definition at line 25 of file source_code_file.py.

ros_introspection.source_code_file.SourceCodeFile.file_path

Definition at line 23 of file source_code_file.py.

ros_introspection.source_code_file.SourceCodeFile.language

Definition at line 29 of file source_code_file.py.

ros_introspection.source_code_file.SourceCodeFile.lines

Definition at line 27 of file source_code_file.py.

ros_introspection.source_code_file.SourceCodeFile.rel_fn

Definition at line 22 of file source_code_file.py.

ros_introspection.source_code_file.SourceCodeFile.tags

Definition at line 24 of file source_code_file.py.


The documentation for this class was generated from the following file:


ros_introspection
Author(s):
autogenerated on Wed Mar 3 2021 03:56:00