DBusCodeGenerator constructor

DBusCodeGenerator(
  1. DBusIntrospectNode node, {
  2. String? comment,
  3. String? className,
})

Creates a new object to generate code from node. className is the name of the generated class, if not provided it will be inferred from node. If provided comment is added to the top of the source.

Implementation

DBusCodeGenerator(this.node, {String? comment, String? className})
    : _comment = comment {
  var className_ = className ?? _nodeToClassName();
  if (className_ == null) {
    throw 'Unable to determine class name';
  }
  this.className = className_;
}