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

org.archifacts.integration.spring.ControllerDescriptor Maven / Gradle / Ivy

The newest version!
package org.archifacts.integration.spring;

import org.archifacts.core.descriptor.BuildingBlockDescriptor;
import org.archifacts.core.model.BuildingBlockType;
import org.springframework.data.rest.webmvc.BasePathAwareController;
import org.springframework.stereotype.Controller;

import com.tngtech.archunit.core.domain.JavaClass;

final class ControllerDescriptor implements BuildingBlockDescriptor {

	private static final BuildingBlockType TYPE = BuildingBlockType.of("Controller");

	ControllerDescriptor() {

	}

	@Override
	public BuildingBlockType type() {
		return TYPE;
	}

	@Override
	public boolean isBuildingBlock(final JavaClass javaClass) {
		return javaClass.isMetaAnnotatedWith(Controller.class) || javaClass.isMetaAnnotatedWith(BasePathAwareController.class);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy