Examples of FieldTypeMap


Examples of info.ata4.unity.serdes.db.FieldTypeMap

   
    private static final Logger L = LogUtils.getLogger();

    @Override
    public void run() {
        FieldTypeMap ftm = StructDatabase.getInstance().getFieldTypeMap();
        Set<TypeField> fieldNodes = new HashSet<>();
        Set<UnityVersion> versions = new TreeSet<>();
        Set<Integer> classIDs = new TreeSet<>();

        for (Map.Entry<Pair<Integer, UnityVersion>, TypeField> entry : ftm.entrySet()) {
            versions.add(entry.getKey().getRight());
            classIDs.add(entry.getKey().getLeft());
            fieldNodes.add(entry.getValue());
        }
       
        L.log(Level.INFO, "Class IDs: {0}", classIDs.size());
        L.log(Level.INFO, "Versions: {0}", versions.size());
        L.log(Level.INFO, "Fields: {0}", fieldNodes.size());
       
        System.out.println();
        System.out.print("        |");
       
        for (Integer classID : classIDs) {
            System.out.print(StringUtils.leftPad(String.valueOf(classID), 4));
            System.out.print(" |");
        }
       
        System.out.println();
        System.out.print("--------|");
        System.out.print(StringUtils.repeat("-----|", classIDs.size()));
        System.out.println();
       
        for (UnityVersion rev : versions) {
            System.out.print(rev);
            System.out.print(" |");
           
            for (Integer classID : classIDs) {
                System.out.print("  ");
                if (ftm.containsKey(new ImmutablePair(classID, rev))) {
                    System.out.print("x");
                } else {
                    System.out.print(" ");
                }
                System.out.print("  |");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.