package com.pictc.utils;


public interface SanFilter {
	
	public final String CLASS_SUFFIX = "^([^\\$]+|[^\\d+]+)\\.class";
	
	public default boolean accept(String current_package,String scan_package) {
		if(scan_package.contains("*")) {
			return current_package.matches(scan_package);
		}
		return current_package.equals(scan_package) || current_package.startsWith(scan_package);
	};
	
	public default boolean accept(String className) {
		 return className.matches(CLASS_SUFFIX);
	};
	
	public default boolean accept(Class<?> klazz) {
		return true;
	};

}
