Skip to content

Latest commit

 

History

History
100 lines (91 loc) · 2.16 KB

README.md

File metadata and controls

100 lines (91 loc) · 2.16 KB

JitPack license

kaitai_struct_model

A simple Swing TreeModel and TreeNode implementations for exploring classes, generated by KaitaiStruct java generator in debug mode.

How customized Viewer could look (in FlatLaf Dark theme): kaitai_struct_gui

Example file
meta:
  id: offsets
seq:
  - id: padding
    type: u1
  - id: unsized
    type: type
  - id: sized
    type: type
    size: 10
instances:
  parse:
    pos: 5
    size: 5
  value_scalar:
    value: 42
  value_list:
    value: '["42"]'
types:
  type:
    seq:
      - id: padding
        type: u1
      - id: unsized_simple
        type: u1
      - id: sized_simple
        size: 1
      - id: unsized_array
        type: elem
        repeat: expr
        repeat-expr: 2
      - id: sized_array
        type: elem
        size: 3
        repeat: expr
        repeat-expr: 1
  elem:
    seq:
      - id: padding
        type: u1
      - id: value
        type: u1

Class diagram of nodes

ParamNode is unused because it is impossible to distinguish between parameters and instances without kaitai_struct_compiler#191.

classDiagram
TreeNode <|.. ValueNode
  ValueNode <|-- ChunkNode
    ChunkNode <|-- SimpleNode
    ChunkNode <|-- StructNode
    ChunkNode <|-- ListNode
  ValueNode <|-- ParamNode

class TreeNode {
  <<interface>>
}
class ValueNode {
  <<abstract>>
  +getValue()* Object
}
class ChunkNode {
  <<abstract>>
  +getSpan() Span
  +isSequential() boolean
}
class SimpleNode {
  +getValue() Object
  +getValueClass() Class
}
class StructNode {
  +getValue() KaitaiStruct
}
class ListNode {
  +getValue() List
  +getElementClass() Class
}
Loading