Package com.bobocode.bring.core.utils
Class BeanScopeUtils
java.lang.Object
com.bobocode.bring.core.utils.BeanScopeUtils
Utility class providing methods for resolving bean scopes and proxy modes based on annotations.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindBeanScope
(Class<?> clazz) Finds the bean scope specified by theScope
annotation on the given class.findBeanScope
(Method method) Finds the bean scope specified by theScope
annotation on the given method.findProxyMode
(Class<?> clazz) Finds the proxy mode specified by theScope
annotation on the given class.findProxyMode
(Method method) Finds the proxy mode specified by theScope
annotation on the given method.Retrieves all available proxy modes.Retrieves all available bean scopes.
-
Constructor Details
-
BeanScopeUtils
public BeanScopeUtils()
-
-
Method Details
-
findBeanScope
Finds the bean scope specified by theScope
annotation on the given class.- Parameters:
clazz
- The class to inspect for the scope annotation- Returns:
- The resolved bean scope or defaulting to
BeanScope.SINGLETON
-
findBeanScope
Finds the bean scope specified by theScope
annotation on the given method.- Parameters:
method
- The method to inspect for the scope annotation- Returns:
- The resolved bean scope or defaulting to
BeanScope.SINGLETON
-
findProxyMode
Finds the proxy mode specified by theScope
annotation on the given class.- Parameters:
clazz
- The class to inspect for the proxy mode annotation- Returns:
- The resolved proxy mode or
null
if not found
-
findProxyMode
Finds the proxy mode specified by theScope
annotation on the given method.- Parameters:
method
- The method to inspect for the proxy mode annotation- Returns:
- The resolved proxy mode or
null
if not found
-
getAllScopes
Retrieves all available bean scopes.- Returns:
- A list containing all available bean scopes
-
getAllProxyModes
Retrieves all available proxy modes.- Returns:
- A list containing all available proxy modes
-