Package introspector
Class Introspector
java.lang.Object
introspector.Introspector
Facade to use Introspector as an API to store Java objects as txt or html trees, and compare trees.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareTrees(Object treeRoot1, Object treeRoot2) Compares two treesstatic booleancompareTreesAsHtml(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 booleancompareTreesAsHtml(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 booleancompareTreesAsHtml(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 booleancompareTreesAsHtml(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 booleancompareTreesAsTxt(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 booleancompareTreesAsTxt(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 booleancompareTreesAsTxt(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 booleancompareTreesAsTxt(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 booleanwriteTreeAsHtml(Object treeRoot, String rootName, String outputFileName) Writes any Java object as a tree in an HTML file, showing all the info of the objectsstatic booleanwriteTreeAsHtml(Object treeRoot, String rootName, String outputFileName, boolean allInfo) Writes any Java object as a tree in an HTML filestatic booleanwriteTreeAsTxt(Object treeRoot, String rootName, String outputFileName) Writes any Java object as a tree in a textual file, showing all the info of the objectsstatic booleanwriteTreeAsTxt(Object treeRoot, String rootName, String outputFileName, boolean allInfo) Writes any Java object as a tree in a textual file
-
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 treerootName- the used to display the root nodeoutputFileName- the output file nameallInfo- 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
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 treerootName- the used to display the root nodeoutputFileName- 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 treerootName- the used to display the root nodeoutputFileName- the output file nameallInfo- 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
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 treerootName- the used to display the root nodeoutputFileName- the output file name- Returns:
- whether the file has been written or not
-
compareTrees
Compares two trees- Parameters:
treeRoot1- the root node of the first treetreeRoot2- 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 treetreeRoot2- the root node of the second treeoutputFileName1- the output file name for the first treeoutputFileName2- the output file name for the second treeallInfo- 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 treetreeRoot2- the root node of the second treeoutputFileName1- the output file name for the first treeoutputFileName2- 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 IntrospectorModeltreeSecondMoment- the tree in the second momentoutputFileName1- the output file name for the first treeoutputFileName2- 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 IntrospectorModeltreeSecondMoment- the tree in the second momentoutputFileName1- the output file name for the first treeoutputFileName2- the output file name for the second treeallInfo- 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 treetreeRoot2- the root node of the second treeoutputFileName1- the output file name for the first treeoutputFileName2- the output file name for the second treeallInfo- 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 treetreeRoot2- the root node of the second treeoutputFileName1- the output file name for the first treeoutputFileName2- 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 IntrospectorModeltreeSecondMoment- the tree in the second momentoutputFileName1- the output file name for the first treeoutputFileName2- 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 IntrospectorModeltreeSecondMoment- the tree in the second momentoutputFileName1- the output file name for the first treeoutputFileName2- the output file name for the second treeallInfo- whether all info of the object is to be displayed (true) or the simplified version (false)- Returns:
- whether the trees are equal or not
-