Message constructor

Message(
  1. Container container,
  2. String tag,
  3. List manifest
)

Implementation

Message(Container container, String tag, List<dynamic> manifest) :
        id = '${container.filename}${validName(tag, firstCapital: true)}Message'.hashCode,
        super(container, tag, '${validName(tag, firstCapital: true)}Message', manifest) {
    if (isReserved(name)) {
        throw Exception('Message node "$tag" in ${container.filename}.json is resulted with the name "$name", which is reserved by Dart language.');
    }
    messageObject = Object(container, '${tag}_message', manifest.first as Map<String, dynamic>, id: id);
    if (messageObject.inheritTag.isNotEmpty) {
        throw Exception('Message node "$tag" in ${container.filename}.json can not be inherited from any other node.');
    }
}