GH-936 - Detect methods (meta-)annotated with @MessageMapping as module entry points.
We now consider all methods that are (meta-)annotated with Spring Messaging's @MessageMapping which is consistently used in a lot of broker annotations such as @(Rabbit|Kafka)Listener etc.
This commit is contained in:
@@ -38,13 +38,24 @@ import com.tngtech.archunit.core.domain.JavaMethod;
|
||||
import com.tngtech.archunit.lang.ArchRule;
|
||||
|
||||
/**
|
||||
* Utility to deal with a variety of types.
|
||||
*
|
||||
* @author Oliver Drotbohm
|
||||
*/
|
||||
class Types {
|
||||
public class Types {
|
||||
|
||||
/**
|
||||
* Loads the class with the given name if present on the classpath.
|
||||
*
|
||||
* @param <T> the type to be loaded
|
||||
* @param name the fully-qualified name of the type to be loaded, must not be {@literal null} or empty.
|
||||
* @return can be {@literal null}.
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T> Class<T> loadIfPresent(String name) {
|
||||
public static <T> Class<T> loadIfPresent(String name) {
|
||||
|
||||
Assert.hasText(name, "Name must not be null or empty!");
|
||||
|
||||
ClassLoader loader = Types.class.getClassLoader();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user