All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zusmart.basic.scanner.processor.ScannerClassAbstractProcessor Maven / Gradle / Ivy

Go to download

基础模块,提供配置,日志,SPI,图排序,路径匹配,资源扫描,包扫描,常用工具类

There is a newer version: 0.0.3
Show newest version
package com.zusmart.basic.scanner.processor;

import java.lang.reflect.Modifier;

import com.zusmart.basic.scanner.ScannerClassProcessor;
import com.zusmart.basic.scanner.ScannerClassResult;

public class ScannerClassAbstractProcessor implements ScannerClassProcessor {

	private boolean ignoreInterface;

	public ScannerClassAbstractProcessor() {
		this.ignoreInterface = false;
	}

	public ScannerClassAbstractProcessor(boolean ignoreInterface) {
		this.ignoreInterface = ignoreInterface;
	}

	@Override
	public boolean execute(ScannerClassResult target) {
		Class targetClass = target.getTargetClass();
		return ignoreInterface ? ((!targetClass.isInterface()) && Modifier.isAbstract(targetClass.getModifiers())) : Modifier.isAbstract(targetClass.getModifiers());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy