Package introspector

Class Introspector

java.lang.Object
introspector.Introspector

public class Introspector extends Object
Facade to use Introspector as an API to store Java objects as txt or html trees, and compare trees.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Utility class
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    compareTrees(Object treeRoot1, Object treeRoot2)
    Compares two trees
    static boolean
    compareTreesAsHtml(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2)
    Compares the same tree in two different moments of time and write both trees in html files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
    static boolean
    compareTreesAsHtml(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2, boolean allInfo)
    Compares the same tree in two different moments of time and write both trees in html files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
    static boolean
    compareTreesAsHtml(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2)
    Compares two trees and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown in red)
    static boolean
    compareTreesAsHtml(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2, boolean allInfo)
    Compares two trees and write both trees in html files highlighting the differences (modified nodes are shown in red)
    static boolean
    compareTreesAsTxt(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2)
    Compares the same tree in two different moments of time and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
    static boolean
    compareTreesAsTxt(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2, boolean allInfo)
    Compares the same tree in two different moments of time and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
    static boolean
    compareTreesAsTxt(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2)
    Compares two trees and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
    static boolean
    compareTreesAsTxt(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2, boolean allInfo)
    Compares two trees and write both trees in txt files highlighting the differences (modified nodes are shown between ** and **)
    static boolean
    writeTreeAsHtml(Object treeRoot, String rootName, String outputFileName)
    Writes any Java object as a tree in an HTML file, showing all the info of the objects
    static boolean
    writeTreeAsHtml(Object treeRoot, String rootName, String outputFileName, boolean allInfo)
    Writes any Java object as a tree in an HTML file
    static boolean
    writeTreeAsTxt(Object treeRoot, String rootName, String outputFileName)
    Writes any Java object as a tree in a textual file, showing all the info of the objects
    static boolean
    writeTreeAsTxt(Object treeRoot, String rootName, String outputFileName, boolean allInfo)
    Writes any Java object as a tree in a textual file

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Introspector

      private Introspector()
      Utility class
  • Method Details

    • writeTreeAsTxt

      public static boolean writeTreeAsTxt(Object treeRoot, String rootName, String outputFileName, boolean allInfo)
      Writes any Java object as a tree in a textual file
      Parameters:
      treeRoot - the object to be considered as the root node of the tree
      rootName - the used to display the root node
      outputFileName - the output file name
      allInfo - whether all info of the object is to be displayed (true) or the simplified version (false)
      Returns:
      whether the file has been written or not
    • writeTreeAsTxt

      public static boolean writeTreeAsTxt(Object treeRoot, String rootName, String outputFileName)
      Writes any Java object as a tree in a textual file, showing all the info of the objects
      Parameters:
      treeRoot - the object to be considered as the root node of the tree
      rootName - the used to display the root node
      outputFileName - the output file name
      Returns:
      whether the file has been written or not
    • writeTreeAsHtml

      public static boolean writeTreeAsHtml(Object treeRoot, String rootName, String outputFileName, boolean allInfo)
      Writes any Java object as a tree in an HTML file
      Parameters:
      treeRoot - the object to be considered as the root node of the tree
      rootName - the used to display the root node
      outputFileName - the output file name
      allInfo - whether all info of the object is to be displayed (true) or the simplified version (false)
      Returns:
      whether the file has been written or not
    • writeTreeAsHtml

      public static boolean writeTreeAsHtml(Object treeRoot, String rootName, String outputFileName)
      Writes any Java object as a tree in an HTML file, showing all the info of the objects
      Parameters:
      treeRoot - the object to be considered as the root node of the tree
      rootName - the used to display the root node
      outputFileName - the output file name
      Returns:
      whether the file has been written or not
    • compareTrees

      public static boolean compareTrees(Object treeRoot1, Object treeRoot2)
      Compares two trees
      Parameters:
      treeRoot1 - the root node of the first tree
      treeRoot2 - the root node of the second tree
      Returns:
      whether the trees are equal or not
    • compareTreesAsTxt

      public static boolean compareTreesAsTxt(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2, boolean allInfo)
      Compares two trees and write both trees in txt files highlighting the differences (modified nodes are shown between ** and **)
      Parameters:
      treeRoot1 - the root node of the first tree
      treeRoot2 - the root node of the second tree
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      allInfo - whether all info of the object is to be displayed (true) or the simplified version (false)
      Returns:
      whether the trees are equal or not
    • compareTreesAsTxt

      public static boolean compareTreesAsTxt(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2)
      Compares two trees and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
      Parameters:
      treeRoot1 - the root node of the first tree
      treeRoot2 - the root node of the second tree
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      Returns:
      whether the trees are equal or not
    • compareTreesAsTxt

      public static boolean compareTreesAsTxt(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2)
      Compares the same tree in two different moments of time and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
      Parameters:
      treeFirstMoment - the tree in the first moment that has been cloned upon construction of the IntrospectorModel
      treeSecondMoment - the tree in the second moment
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      Returns:
      whether the trees are equal or not
    • compareTreesAsTxt

      public static boolean compareTreesAsTxt(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2, boolean allInfo)
      Compares the same tree in two different moments of time and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
      Parameters:
      treeFirstMoment - the tree in the first moment that has been cloned upon construction of the IntrospectorModel
      treeSecondMoment - the tree in the second moment
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      allInfo - whether all info of the object is to be displayed (true) or the simplified version (false)
      Returns:
      whether the trees are equal or not
    • compareTreesAsHtml

      public static boolean compareTreesAsHtml(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2, boolean allInfo)
      Compares two trees and write both trees in html files highlighting the differences (modified nodes are shown in red)
      Parameters:
      treeRoot1 - the root node of the first tree
      treeRoot2 - the root node of the second tree
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      allInfo - whether all info of the object is to be displayed (true) or the simplified version (false)
      Returns:
      whether the trees are equal or not
    • compareTreesAsHtml

      public static boolean compareTreesAsHtml(Object treeRoot1, Object treeRoot2, String outputFileName1, String outputFileName2)
      Compares two trees and write both trees in txt files highlighting the differences showing all the info of the objects (modified nodes are shown in red)
      Parameters:
      treeRoot1 - the root node of the first tree
      treeRoot2 - the root node of the second tree
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      Returns:
      whether the trees are equal or not
    • compareTreesAsHtml

      public static boolean compareTreesAsHtml(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2)
      Compares the same tree in two different moments of time and write both trees in html files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
      Parameters:
      treeFirstMoment - the tree in the first moment that has been cloned upon construction of the IntrospectorModel
      treeSecondMoment - the tree in the second moment
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      Returns:
      whether the trees are equal or not
    • compareTreesAsHtml

      public static boolean compareTreesAsHtml(IntrospectorModel treeFirstMoment, Object treeSecondMoment, String outputFileName1, String outputFileName2, boolean allInfo)
      Compares the same tree in two different moments of time and write both trees in html files highlighting the differences showing all the info of the objects (modified nodes are shown between ** and **)
      Parameters:
      treeFirstMoment - the tree in the first moment that has been cloned upon construction of the IntrospectorModel
      treeSecondMoment - the tree in the second moment
      outputFileName1 - the output file name for the first tree
      outputFileName2 - the output file name for the second tree
      allInfo - whether all info of the object is to be displayed (true) or the simplified version (false)
      Returns:
      whether the trees are equal or not