package com.pictc.utils;

public class SanDefaultFilter implements SanFilter{
	
	public final String CLASS_SUFFIX = "^([^\\$]+|[^\\d+]+)\\.class";
	
	@Override
	public boolean accept(String current_package,String scan_package) {
		if(StringUtils.isEmpty(scan_package)) {
			return true;
		}else if(scan_package.contains("*")) {
			return current_package.matches(scan_package);
		}
		return current_package.startsWith(scan_package);
	}

	@Override
	public boolean accept(String className) {
		 return className.matches(CLASS_SUFFIX);
	}


}
