<commit_before>/*
 ** 2013 June 16
 **
 ** The author disclaims copyright to this source code.  In place of
 ** a legal notice, here is a blessing:
 **    May you do good and not evil.
 **    May you find forgiveness for yourself and forgive others.
 **    May you share freely, never taking more than you give.
 */
package info.ata4.unity.asset;

import info.ata4.io.DataReader;
import info.ata4.io.DataWriter;
import info.ata4.io.Struct;
import java.io.IOException;
import java.util.Objects;

/**
 * Class that contains the runtime type of a single field.
 * 
 * @author <NAME> <barracuda415 at yahoo.de>
 * @unity TypeTree
 */
public class FieldType implements Struct {
    
    public static final int FLAG_FORCE_ALIGN = 0x4000;
    
    // field type string
    private String type;
    
    // field name string
    private String name;
    
    // size of the field value in bytes or -1 if the field contains sub-fields only
    private int size;
    
    // field index for the associated parent field
    private int index;
    
    // set to 1 if "type" is "Array" or "TypelessData"
    private int isArray;
    
    // observed values: 1-5, 8
    private int version;
    
    // field flags
    // observed values:
    // 0x1
    // 0x10
    // 0x800
    // 0x4000
    // 0x8000
    // 0x200000
    // 0x400000
    private int metaFlag;
    
    public boolean isForceAlign() {
        return (metaFlag & FLAG_FORCE_ALIGN) != 0;
    }
    
    public void setForceAlign(boolean forceAlign) {
        if (forceAlign) {
            metaFlag |= FLAG_FORCE_ALIGN;
        } else {
            metaFlag &= ~FLAG_FORCE_ALIGN;
        }
    }

    public String getTypeName() {
        return type;
    }

    public void setTypeName(String type) {
        this.type = type;<commit_msg>Added information for the version field<commit_after>/*
 ** 2013 June 16
 **
 ** The author disclaims copyright to this source code.  In place of
 ** a legal notice, here is a blessing:
 **    May you do good and not evil.
 **    May you find forgiveness for yourself and forgive others.
 **    May you share freely, never taking more than you give.
 */
package info.ata4.unity.asset;

import info.ata4.io.DataReader;
import info.ata4.io.DataWriter;
import info.ata4.io.Struct;
import java.io.IOException;
import java.util.Objects;

/**
 * Class that contains the runtime type of a single field.
 * 
 * @author <NAME> <barracuda415 at yahoo.de>
 * @unity TypeTree
 */
public class FieldType implements Struct {
    
    public static final int FLAG_FORCE_ALIGN = 0x4000;
    
    // field type string
    private String type;
    
    // field name string
    private String name;
    
    // size of the field value in bytes or -1 if the field contains sub-fields only
    private int size;
    
    // field index for the associated parent field
    private int index;
    
    // set to 1 if "type" is "Array" or "TypelessData"
    private int isArray;
    
    // type version, starts with 1 and is incremented when the type
    // information is updated in a new Unity release
    //
    // equal to serializedVersion in YAML format files
    private int version;
    
    // field flags
    // observed values:
    // 0x1
    // 0x10
    // 0x800
    // 0x4000
    // 0x8000
    // 0x200000
    // 0x400000
    private int metaFlag;
    
    public boolean isForceAlign() {
        return (metaFlag & FLAG_FORCE_ALIGN) != 0;
    }
    
    public void setForceAlign(boolean forceAlign) {
        if (forceAlign) {
            metaFlag |= FLAG_FORCE_ALIGN;
        } else {
            metaFlag &= ~FLAG_FORCE_ALIGN;
        }
    }

    public String getTypeName() {
        return type;
    }

    public void setTypeName(String type) {
        this.type = type;
{'fraction_non_alphanumeric': 0.08457446808510638, 'fraction_numerical': 0.029787234042553193, 'mean_word_length': 2.1872881355932203, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2221328', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1107, 'n_words': 406}