Annotation Type Generated


  • @Documented
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface Generated
    Annotation, that applied to Kaitai-generated classes. Visualizers can use that annotation to find classes, that contains generated stuff, that should be showed in visualization.
    Since:
    0.9
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      boolean autoRead
      Determines, if instantiation of user classes (related to user-types, defined in ksy file) automatically read its content from the stream, or that must be performed manually by calling generated _read(), _readBE() or _readLE() method.
      String doc
      Documentation string attached to the type definition, specified in doc KSY element.
      String id
      Original identifier (id key) from ksy file.
      boolean posInfo
      Class compiled with support of position tracking.
      String version
      Version of compiler, that generated this class.
    • Element Detail

      • id

        String id
        Original identifier (id key) from ksy file.
        Returns:
        Identifier, that can differ from class name, if it clash with Java reserved words. Can not be empty
      • version

        String version
        Version of compiler, that generated this class.
        Returns:
        Version string in semver format
      • posInfo

        boolean posInfo
        Class compiled with support of position tracking. That means, that every class has following public fields (in that version of generator):
        Position tracking info.
        TypeFieldDescription
        Map<String, Integer>_attrStart Start offset in the root stream, where an attribute or an instance with specified name begins. Used only for attributes/instances, that is not repeated
        Map<String, Integer>_attrEnd Start offset in the root stream, where an attribute or an instance with specified name ends (exclusive). Used only for attributes/instances, that is not repeated
        Map<String, ? extends List<Integer>>_arrStart List with start offset in the root stream, where each array element of repeated attribute or instance with specified name begins. Used only for attributes/instances, that is repeated
        Map<String, ? extends List<Integer>>_arrEnd List with end offset (exclusive) in the root stream, where each array element of repeated attribute or instance with specified name ends. Used only for attributes/instances, that is repeated
        Returns:
        true, if position tracking is enabled and false otherwise
      • autoRead

        boolean autoRead
        Determines, if instantiation of user classes (related to user-types, defined in ksy file) automatically read its content from the stream, or that must be performed manually by calling generated _read(), _readBE() or _readLE() method.
        Returns:
        true, if generated _read() method invoked automatically by class constructors and false, if it must be called explicitly
      • doc

        String doc
        Documentation string attached to the type definition, specified in doc KSY element.
        Returns:
        Documentation string for a type. If documentation is missed, returns empty string