(boolean inputsOnly)
| 762 | } |
| 763 | |
| 764 | public MatchingStatus getStatus(boolean inputsOnly) { |
| 765 | int totalClassCount = 0; |
| 766 | int matchedClassCount = 0; |
| 767 | int totalMethodCount = 0; |
| 768 | int matchedMethodCount = 0; |
| 769 | int totalMethodArgCount = 0; |
| 770 | int matchedMethodArgCount = 0; |
| 771 | int totalMethodVarCount = 0; |
| 772 | int matchedMethodVarCount = 0; |
| 773 | int totalFieldCount = 0; |
| 774 | int matchedFieldCount = 0; |
| 775 | |
| 776 | for (ClassInstance cls : env.getClassesA()) { |
| 777 | if (inputsOnly && !cls.isInput()) continue; |
| 778 | |
| 779 | totalClassCount++; |
| 780 | if (cls.hasMatch()) matchedClassCount++; |
| 781 | |
| 782 | for (MethodInstance method : cls.getMethods()) { |
| 783 | if (method.isReal()) { |
| 784 | totalMethodCount++; |
| 785 | |
| 786 | if (method.hasMatch()) matchedMethodCount++; |
| 787 | |
| 788 | for (MethodVarInstance arg : method.getArgs()) { |
| 789 | totalMethodArgCount++; |
| 790 | |
| 791 | if (arg.hasMatch()) matchedMethodArgCount++; |
| 792 | } |
| 793 | |
| 794 | for (MethodVarInstance var : method.getVars()) { |
| 795 | totalMethodVarCount++; |
| 796 | |
| 797 | if (var.hasMatch()) matchedMethodVarCount++; |
| 798 | } |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | for (FieldInstance field : cls.getFields()) { |
| 803 | if (field.isReal()) { |
| 804 | totalFieldCount++; |
| 805 | |
| 806 | if (field.hasMatch()) matchedFieldCount++; |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | |
| 811 | return new MatchingStatus(totalClassCount, matchedClassCount, |
| 812 | totalMethodCount, matchedMethodCount, |
| 813 | totalMethodArgCount, matchedMethodArgCount, |
| 814 | totalMethodVarCount, matchedMethodVarCount, |
| 815 | totalFieldCount, matchedFieldCount); |
| 816 | } |
| 817 | |
| 818 | public static class MatchingStatus { |
| 819 | MatchingStatus(int totalClassCount, int matchedClassCount, |
no test coverage detected