
com.github.thorbenkuck.di.domain.aop.AspectAwareProxy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wire-di-runtime-environment Show documentation
Show all versions of wire-di-runtime-environment Show documentation
Easy and simple di using annotation processors
The newest version!
package com.github.thorbenkuck.di.domain.aop;
import org.jetbrains.annotations.Nullable;
/**
* This interface is a marker interface to identify generated Proxy classes.
*
* It has no special methods and is only used, so that at runtime a user might evaluate, if any specific class
* is a generated proxy or not. If any class is instance of this interface, it is by contract a generated class.
* Especially the default annotation processor automatically applies this interface.
*
* For convenience the method {@link #isProxy(Object)} may be used, to check if any specific object is a proxy. Just
* note that you should normally never require this check. If you find yourself requiring this method, consider
* overthinking the approach you are currently implementing.
*/
public interface AspectAwareProxy {
static boolean isProxy(@Nullable final Object instance) {
return instance instanceof AspectAwareProxy;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy