@Test public void testShouldLogMember() { assertThat(XLogUtils.shouldLogMember(null, getMember(XLogMethod.class, "get")), is(false)); assertThat(XLogUtils.shouldLogMember(XLOG_METHODS, null), is(false)); assertThat(XLogUtils.shouldLogMember(XLOG_METHODS, getMember(MethodToLog.class, "get")), is(true)); assertThat(XLogUtils.shouldLogMember(XLOG_METHODS, getMember(Object.class, "toString")), is(false)); assertThat(XLogUtils.shouldLogMember(XLOG_METHODS, getMember(Object.class, "getClass")), is(true)); }
public static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member) { if (xLogMethods == null || member == null) { return false; } for (XLogMethod xLogMethod : xLogMethods) { if (xLogMethod != null && xLogMethod.getClassName() != null && xLogMethod.getClassName() .equals(member.getDeclaringClass().getCanonicalName())) { if (xLogMethod.getMethodName() == null || xLogMethod.getMethodName().equals("")) { return true; } if (xLogMethod.getMethodName().equals(member.getName())) { return true; } } } return false; }
XLogUtils { public static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member) { if (xLogMethods == null || member == null) { return false; } for (XLogMethod xLogMethod : xLogMethods) { if (xLogMethod != null && xLogMethod.getClassName() != null && xLogMethod.getClassName() .equals(member.getDeclaringClass().getCanonicalName())) { if (xLogMethod.getMethodName() == null || xLogMethod.getMethodName().equals("")) { return true; } if (xLogMethod.getMethodName().equals(member.getName())) { return true; } } } return false; } }
XLogUtils { public static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member) { if (xLogMethods == null || member == null) { return false; } for (XLogMethod xLogMethod : xLogMethods) { if (xLogMethod != null && xLogMethod.getClassName() != null && xLogMethod.getClassName() .equals(member.getDeclaringClass().getCanonicalName())) { if (xLogMethod.getMethodName() == null || xLogMethod.getMethodName().equals("")) { return true; } if (xLogMethod.getMethodName().equals(member.getName())) { return true; } } } return false; } private  XLogUtils(); }
XLogUtils { public static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member) { if (xLogMethods == null || member == null) { return false; } for (XLogMethod xLogMethod : xLogMethods) { if (xLogMethod != null && xLogMethod.getClassName() != null && xLogMethod.getClassName() .equals(member.getDeclaringClass().getCanonicalName())) { if (xLogMethod.getMethodName() == null || xLogMethod.getMethodName().equals("")) { return true; } if (xLogMethod.getMethodName().equals(member.getName())) { return true; } } } return false; } private  XLogUtils(); static Set<String> getRemainingClassNames(Set<Class<?>> classes,
            Set<String> classNames); static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member); static boolean filterResult(String className, XLogSetting xLogSetting); static List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
            int pkgSectionSize); static List<String> getPkgPrefixesForCoarseMatchXLogMethods(List<XLogMethod> xLogMethods,
            int pkgSectionSize); }
XLogUtils { public static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member) { if (xLogMethods == null || member == null) { return false; } for (XLogMethod xLogMethod : xLogMethods) { if (xLogMethod != null && xLogMethod.getClassName() != null && xLogMethod.getClassName() .equals(member.getDeclaringClass().getCanonicalName())) { if (xLogMethod.getMethodName() == null || xLogMethod.getMethodName().equals("")) { return true; } if (xLogMethod.getMethodName().equals(member.getName())) { return true; } } } return false; } private  XLogUtils(); static Set<String> getRemainingClassNames(Set<Class<?>> classes,
            Set<String> classNames); static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member); static boolean filterResult(String className, XLogSetting xLogSetting); static List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
            int pkgSectionSize); static List<String> getPkgPrefixesForCoarseMatchXLogMethods(List<XLogMethod> xLogMethods,
            int pkgSectionSize); static final int TYPE_METHOD; static final int TYPE_CONSTRUCTOR; static final String PKG_NAME; static final String CLASS_NAME; static final String FIELD_NAME_METHODS; static final String FIELD_NAME_CLASSES; }