test_class.declarator: METHODS_TO_LOG
              = "[{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"<init>\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"int\"], \"parameterNames\":[\"i\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"methodToLog\"]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"<init>\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"int\"], \"parameterNames\":[\"i\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"methodToLog\"]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"<init>\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"<init>\", \"parameterClasses\":[\"int\"], \"parameterNames\":[\"anInt\"]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"<init>\", \"parameterClasses\":[\"int\",\"java.lang.Long\",\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"anInt\",\"aLong\",\"methodToLog\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"method1\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"method1\", \"parameterClasses\":[\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"methodToLog\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"method1\", \"parameterClasses\":[\"int\",\"java.lang.Integer\"], \"parameterNames\":[\"i\",\"j\"]}]"
test_class.modifier: public static  final
test_class.original_string: public static  final String METHODS_TO_LOG
              = "[{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"<init>\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"int\"], \"parameterNames\":[\"i\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.InnerClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"methodToLog\"]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"<init>\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"int\"], \"parameterNames\":[\"i\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod.StaticNestedClass\", \"methodName\":\"innerMethod\", \"parameterClasses\":[\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"methodToLog\"]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"<init>\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"<init>\", \"parameterClasses\":[\"int\"], \"parameterNames\":[\"anInt\"]},{\"type\":1, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"<init>\", \"parameterClasses\":[\"int\",\"java.lang.Long\",\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"anInt\",\"aLong\",\"methodToLog\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"method1\", \"parameterClasses\":[], \"parameterNames\":[]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"method1\", \"parameterClasses\":[\"com.promegu.xlog.base.MethodToLog\"], \"parameterNames\":[\"methodToLog\"]},{\"type\":0, \"className\":\"com.promegu.xlog.base.TestMatchMethod\", \"methodName\":\"method1\", \"parameterClasses\":[\"int\",\"java.lang.Integer\"], \"parameterNames\":[\"i\",\"j\"]}]";
test_class.type: String
test_class.var_name: METHODS_TO_LOG
test_class.file: xlog-base/src/test/java/com/promegu/xlog/base/MethodToLogTest.java
test_class.identifier: MethodToLogTest
test_case.body: @Test
      public void testMatchMethodOrConstructor() {
          List<MethodToLog> methodToLogs = new Gson()
                  .fromJson(METHODS_TO_LOG, new TypeToken<List<MethodToLog>>() {
                  }.getType());
  
          Set<Member> methods = new HashSet<>();
          methods.addAll(Arrays.asList(TestMatchMethod.class.getDeclaredMethods()));
          methods.addAll(Arrays.asList(TestMatchMethod.class.getDeclaredConstructors()));
          methods.addAll(Arrays.asList(TestMatchMethod.InnerClass.class.getDeclaredMethods()));
          methods.addAll(Arrays.asList(TestMatchMethod.InnerClass.class.getDeclaredConstructors()));
          methods.addAll(Arrays.asList(TestMatchMethod.StaticNestedClass.class.getDeclaredMethods()));
          methods.addAll(
                  Arrays.asList(TestMatchMethod.StaticNestedClass.class.getDeclaredConstructors()));
  
          for (Member member : methods) {
              int matchCount = 0;
  
              for (MethodToLog methodToLog : methodToLogs) {
                  if (methodToLog.matchMethodOrConstructor(member)) {
                      matchCount++;
                  }
              }
  
              // ensure every method match 1 time
              assertThat(matchCount, is(1));
          }
  
          // ensure every method is tested
          assertThat(methodToLogs.size(), is(methods.size()));
      }
test_case.class_method_signature: MethodToLogTest.testMatchMethodOrConstructor()
test_case.full_signature: @Test public void testMatchMethodOrConstructor()
test_case.identifier: testMatchMethodOrConstructor
test_case.invocations: fromJson getType addAll asList getDeclaredMethods addAll asList getDeclaredConstructors addAll asList getDeclaredMethods addAll asList getDeclaredConstructors addAll asList getDeclaredMethods addAll asList getDeclaredConstructors matchMethodOrConstructor assertThat is assertThat size is size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMatchMethodOrConstructor()
focal_class.declarator: type
focal_class.modifier: private
focal_class.original_string: private int type;
focal_class.type: int
focal_class.var_name: type
focal_class.declarator: className
focal_class.modifier: private
focal_class.original_string: private String className;
focal_class.type: String
focal_class.var_name: className
focal_class.declarator: methodName
focal_class.modifier: private
focal_class.original_string: private String methodName;
focal_class.type: String
focal_class.var_name: methodName
focal_class.declarator: parameterClasses
focal_class.modifier: private
focal_class.original_string: private List<String> parameterClasses;
focal_class.type: List<String>
focal_class.var_name: parameterClasses
focal_class.declarator: parameterNames
focal_class.modifier: private
focal_class.original_string: private List<String> parameterNames;
focal_class.type: List<String>
focal_class.var_name: parameterNames
focal_class.file: xlog-base/src/main/java/com/promegu/xlog/base/MethodToLog.java
focal_class.identifier: MethodToLog
focal_class.class_method_signature: MethodToLog.MethodToLog(int type, String className, String methodName, List<String> parameterClasses,
              List<String> parameterNames)
focal_class.full_signature: public  MethodToLog(int type, String className, String methodName, List<String> parameterClasses,
              List<String> parameterNames)
focal_class.identifier: MethodToLog
focal_class.modifiers: public
focal_class.parameters: (int type, String className, String methodName, List<String> parameterClasses,
              List<String> parameterNames)
focal_class.signature:  MethodToLog(int type, String className, String methodName, List<String> parameterClasses,
              List<String> parameterNames)
focal_class.class_method_signature: MethodToLog.getType()
focal_class.full_signature: public int getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getType()
focal_class.class_method_signature: MethodToLog.getClassName()
focal_class.full_signature: public String getClassName()
focal_class.identifier: getClassName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getClassName()
focal_class.class_method_signature: MethodToLog.getName()
focal_class.full_signature: public String getName()
focal_class.identifier: getName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: MethodToLog.getParameterClasses()
focal_class.full_signature: public List<String> getParameterClasses()
focal_class.identifier: getParameterClasses
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getParameterClasses()
focal_class.class_method_signature: MethodToLog.getParameterNames()
focal_class.full_signature: public List<String> getParameterNames()
focal_class.identifier: getParameterNames
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getParameterNames()
focal_class.class_method_signature: MethodToLog.isMethod()
focal_class.full_signature: public boolean isMethod()
focal_class.identifier: isMethod
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isMethod()
focal_class.class_method_signature: MethodToLog.isConstructor()
focal_class.full_signature: public boolean isConstructor()
focal_class.identifier: isConstructor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isConstructor()
focal_class.class_method_signature: MethodToLog.matchMethodOrConstructor(Member member)
focal_class.full_signature: public boolean matchMethodOrConstructor(Member member)
focal_class.identifier: matchMethodOrConstructor
focal_class.modifiers: public
focal_class.parameters: (Member member)
focal_class.return: boolean
focal_class.signature: boolean matchMethodOrConstructor(Member member)
focal_class.class_method_signature: MethodToLog.matchMethod(Method method)
focal_class.full_signature: private boolean matchMethod(Method method)
focal_class.identifier: matchMethod
focal_class.modifiers: private
focal_class.parameters: (Method method)
focal_class.return: boolean
focal_class.signature: boolean matchMethod(Method method)
focal_class.class_method_signature: MethodToLog.matchMethod(Constructor constructor)
focal_class.full_signature: private boolean matchMethod(Constructor constructor)
focal_class.identifier: matchMethod
focal_class.modifiers: private
focal_class.parameters: (Constructor constructor)
focal_class.return: boolean
focal_class.signature: boolean matchMethod(Constructor constructor)
focal_class.class_method_signature: MethodToLog.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public boolean matchMethodOrConstructor(Member member) {
          if (member instanceof Method) {
              return matchMethod((Method) member);
          } else if (member instanceof Constructor) {
              return matchMethod((Constructor) member);
          }
          return false;
      }
focal_method.class_method_signature: MethodToLog.matchMethodOrConstructor(Member member)
focal_method.full_signature: public boolean matchMethodOrConstructor(Member member)
focal_method.identifier: matchMethodOrConstructor
focal_method.invocations: matchMethod matchMethod
focal_method.modifiers: public
focal_method.parameters: (Member member)
focal_method.return: boolean
focal_method.signature: boolean matchMethodOrConstructor(Member member)