DesignPatternToNestedStructureMapEntrySignature mixin

Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toNestedStructureMapEntry() MapEntry<String, Object>
  • Map ではなく MapEntry である必要性 まず 前提として key 名には 型 を使う. しかし それだと同じ key 名になってしまうことがあり そうなると 上書きされてしまい これを防ぐ必要がある. root の key 名は 型 のみだが nest された key 名は 型 + 接頭辞 or 接尾辞 とする. nest された型の key 名を編集するにあたり MapEntry がやりやすい.

  • それぞれの値の返し方

    1. AggregationPattern で toShorthand を実装 toShorthand の処理は定義側が自由に定義する. だいたいは csv のようなコンマ区切りの値をまとめた1行表示を想定している. 多重入れ子構造の class の場合一番深い class にこの toShorthand が定義されていることを期待している. 一番深い class は すべての property が ValuePattern であるはずなので.
    2. AggregationPattern で toShorthand を未実装 これは 階層の上の部分を想定しており これらは自分が property としてもつ AggregationPattern.toNestedStructureMapEntry.value, ValuePattern.value などを呼ぶことを想定.
    3. IterablePattern
    4. IterablePattern
    5. IterablePattern
  • toString() String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited