Class BeanScopeUtils

java.lang.Object
com.bobocode.bring.core.utils.BeanScopeUtils

public class BeanScopeUtils extends Object
Utility class providing methods for resolving bean scopes and proxy modes based on annotations.
Since:
1.0
Author:
Blyzhnytsia Team
  • Constructor Details

    • BeanScopeUtils

      public BeanScopeUtils()
  • Method Details

    • findBeanScope

      public BeanScope findBeanScope(Class<?> clazz)
      Finds the bean scope specified by the Scope 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

      public BeanScope findBeanScope(Method method)
      Finds the bean scope specified by the Scope 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

      public ProxyMode findProxyMode(Class<?> clazz)
      Finds the proxy mode specified by the Scope 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

      public ProxyMode findProxyMode(Method method)
      Finds the proxy mode specified by the Scope 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

      private List<BeanScope> getAllScopes()
      Retrieves all available bean scopes.
      Returns:
      A list containing all available bean scopes
    • getAllProxyModes

      private List<ProxyMode> getAllProxyModes()
      Retrieves all available proxy modes.
      Returns:
      A list containing all available proxy modes