Class ConfigurationBeanNameAnnotationResolver

java.lang.Object
com.bobocode.bring.core.annotation.resolver.impl.ConfigurationBeanNameAnnotationResolver
All Implemented Interfaces:
AnnotationResolver

public class ConfigurationBeanNameAnnotationResolver extends Object implements AnnotationResolver
This class implements the AnnotationResolver interface to resolve the name of a configuration bean based on the presence of the Configuration annotation.
Since:
1.0
Author:
Blyzhnytsia Team
  • Constructor Details

    • ConfigurationBeanNameAnnotationResolver

      public ConfigurationBeanNameAnnotationResolver()
  • Method Details

    • isSupported

      public boolean isSupported(Class<?> clazz)
      Checks if the provided class is supported for resolving.
      Specified by:
      isSupported in interface AnnotationResolver
      Parameters:
      clazz - The class to be checked for support.
      Returns:
      true if the class has the Configuration annotation, false otherwise.
    • resolve

      public String resolve(Class<?> clazz)
      Resolves the name of the configuration bean based on the provided class.
      Specified by:
      resolve in interface AnnotationResolver
      Parameters:
      clazz - The class for which the name of the configuration bean needs to be resolved.
      Returns:
      A String representing the simple name of the class.