Class AbstractAnnotationConfigSupport

java.lang.Object
org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware
Direct Known Subclasses:
AbstractCacheConfiguration, AddCacheServerConfiguration, AddPoolConfiguration, ApacheShiroSecurityConfiguration, AuthenticationBeanConfiguration, AutoRegionLookupConfiguration, CachingDefinedRegionsConfiguration, CachingDefinedRegionsConfiguration.AbstractCacheNameResolver, ClusterConfigurationConfiguration, ClusterDefinedRegionsConfiguration, CompressionConfiguration, ContinuousQueryConfiguration, DiskStoreConfiguration, EmbeddedServiceConfigurationSupport, EntityDefinedRegionsConfiguration, EvictionConfiguration, ExpirationConfiguration, GatewayReceiverConfiguration, GatewaySenderBeanFactoryPostProcessor, GatewaySenderConfiguration, GemfireCacheTransactionsConfiguration, LocatorApplicationConfiguration, OffHeapConfiguration.OffHeapBeanFactoryPostProcessor, PdxConfiguration

public abstract class AbstractAnnotationConfigSupport extends Object implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware
An abstract base class encapsulating functionality common to all Spring Data for Apache Geode (SDG) annotations and configuration classes used to configure Apache Geode objects using Spring Data for Apache Geode.
Since:
1.9.0
See Also:
  • ClassLoader
  • Annotation
  • AnnotatedElement
  • BeanClassLoaderAware
  • BeanFactory
  • BeanFactoryAware
  • AnnotatedBeanDefinition
  • ConfigurableBeanFactory
  • AbstractBeanDefinition
  • BeanDefinitionRegistry
  • EnvironmentAware
  • AnnotationAttributes
  • Environment
  • AnnotationMetadata
  • MethodMetadata
  • EvaluationContext
  • Field Details

    • INFRASTRUCTURE_ROLES

      protected static final Set<Integer> INFRASTRUCTURE_ROLES
    • ORG_SPRINGFRAMEWORK_DATA_GEMFIRE_PACKAGE

      protected static final String ORG_SPRINGFRAMEWORK_DATA_GEMFIRE_PACKAGE
      See Also:
    • ORG_SPRINGFRAMEWORK_PACKAGE

      protected static final String ORG_SPRINGFRAMEWORK_PACKAGE
      See Also:
    • SPRING_DATA_GEMFIRE_PROPERTY_PREFIX

      protected static final String SPRING_DATA_GEMFIRE_PROPERTY_PREFIX
      See Also:
    • CURRENT_THREAD_CONTEXT_CLASS_LOADER

      protected static final Supplier<ClassLoader> CURRENT_THREAD_CONTEXT_CLASS_LOADER
  • Constructor Details

  • Method Details

    • hasValue

      public static boolean hasValue(@Nullable Number value)
      Determines whether the given Number has value. The Number is considered valuable if it is not null and is not equal to 0.0d.
      Parameters:
      value - Number to evaluate.
      Returns:
      a boolean value indicating whether the given Number has value.
      See Also:
    • hasValue

      public static boolean hasValue(@Nullable Object value)
      Determines whether the given Object has value. The Object is considered valuable if it is not null.
      Parameters:
      value - Object to evaluate.
      Returns:
      a boolean value indicating whether the given Object has value.
      See Also:
    • hasValue

      public static boolean hasValue(@Nullable String value)
      Determines whether the given String has value. The String is considered valuable if it is not null and not empty.
      Parameters:
      value - String to evaluate.
      Returns:
      a boolean value indicating whether the given String is valuable.
      See Also:
    • newEvaluationContext

      protected org.springframework.expression.EvaluationContext newEvaluationContext(@Nullable org.springframework.beans.factory.BeanFactory beanFactory)
      Constructs, configures and initializes a new instance of an EvaluationContext.
      Parameters:
      beanFactory - reference to the Spring BeanFactory.
      Returns:
      a new EvaluationContext.
      See Also:
    • newLogger

      @NonNull protected org.slf4j.Logger newLogger()
      Constructs a new instance of Logger to log statements printed by Spring Data for Apache Geode.
      Returns:
      a new instance of Logger.
      See Also:
      • LoggerFactory.getLogger(Class)
      • Logger
    • isAnnotationPresent

      protected boolean isAnnotationPresent(@NonNull org.springframework.core.type.AnnotationMetadata importingClassMetadata)
      Determines whether the given type meta-data for a particular Class is annotated with the declared getAnnotationTypeName().
      Parameters:
      importingClassMetadata - type meta-data for a particular Class.
      Returns:
      a boolean indicating whether the particular Class is annotated with the declared getAnnotationTypeName().
      See Also:
    • isAnnotationPresent

      protected boolean isAnnotationPresent(@NonNull org.springframework.core.type.AnnotationMetadata importingClassMetadata, @NonNull String annotationName)
      Determines whether the given type meta-data for a particular Class is annotated with the given Annotation defined by name.
      Parameters:
      importingClassMetadata - type meta-data for a particular Class.
      annotationName - name of the Annotation of interests.
      Returns:
      a boolean indicating whether the particular Class is annotated with the given Annotation defined by name.
      See Also:
      • AnnotationMetadata
    • getAnnotationAttributes

      @NonNull protected org.springframework.core.annotation.AnnotationAttributes getAnnotationAttributes(@NonNull Annotation annotation)
      Returns the AnnotationAttributes for the given Annotation.
      Parameters:
      annotation - Annotation to get the AnnotationAttributes for.
      Returns:
      the AnnotationAttributes for the given Annotation.
      See Also:
    • getAnnotationAttributes

      @NonNull protected org.springframework.core.annotation.AnnotationAttributes getAnnotationAttributes(@NonNull org.springframework.core.type.AnnotationMetadata importingClassMetadata)
      Returns AnnotationAttributes for the declared getAnnotationTypeName().
      Parameters:
      importingClassMetadata - type meta-data for a particular Class.
      Returns:
      AnnotationAttributes for the declared getAnnotationTypeName().
      See Also:
    • getAnnotationAttributes

      @NonNull protected org.springframework.core.annotation.AnnotationAttributes getAnnotationAttributes(@NonNull org.springframework.core.type.AnnotationMetadata importingClassMetadata, @NonNull String annotationName)
      Returns AnnotationAttributes for the given named Annotation from the given type meta-data.
      Parameters:
      importingClassMetadata - type meta-data for a particular Class.
      annotationName - name of the Annotation of interests.
      Returns:
      AnnotationAttributes for the given named Annotation.
      See Also:
      • AnnotationAttributes
      • AnnotationMetadata
    • getAnnotationType

      @NonNull protected abstract Class<? extends Annotation> getAnnotationType()
      Returns the cache application Annotation type pertaining to this configuration.
      Returns:
      the cache application Annotation type used by this application.
    • getAnnotationTypeName

      @NonNull protected String getAnnotationTypeName()
      Returns the fully-qualified class name of the cache application Annotation type.
      Returns:
      the fully-qualified class name of the cache application Annotation type.
      See Also:
    • getAnnotationTypeSimpleName

      @NonNull protected String getAnnotationTypeSimpleName()
      Returns the simple class name of the cache application Annotation type.
      Returns:
      the simple class name of the cache application Annotation type.
      See Also:
    • isNotInfrastructureBean

      protected boolean isNotInfrastructureBean(@Nullable Object bean)
      Null-safe method used to determine whether the given bean is a Spring container provided infrastructure bean.
      Parameters:
      bean - Object to evaluate.
      Returns:
      true iff the bean is not a Spring container provided infrastructure bean.
      See Also:
    • isNotInfrastructureBean

      protected boolean isNotInfrastructureBean(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition)
      Null-safe method used to determine whether the bean defined by the given BeanDefinition is a Spring container provided infrastructure bean.
      Parameters:
      beanDefinition - BeanDefinition to evaluate.
      Returns:
      true iff the bean defined by the given BeanDefinition is not a Spring container provided infrastructure bean.
      See Also:
    • isNotInfrastructureClass

      protected boolean isNotInfrastructureClass(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition)
      Null-safe method used to determine whether the bean defined by the given BeanDefinition is a Spring container infrastructure bean based on the bean's class name.
      Parameters:
      beanDefinition - BeanDefinition of the bean to evaluate.
      Returns:
      true iff the bean defined in the given BeanDefinition is not a Spring container infrastructure bean. Returns false if the bean class name cannot be resolved.
      See Also:
    • isNotInfrastructureRole

      protected boolean isNotInfrastructureRole(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition)
      Null-safe method to determines whether the bean defined by the given BeanDefinition is a Spring container infrastructure bean based on the bean's role.
      Parameters:
      beanDefinition - BeanDefinition of the bean to evaluate.
      Returns:
      true iff the bean defined in the given BeanDefinition is not a Spring container infrastructure bean.
      See Also:
      • BeanDefinition
    • isUserLevelMethod

      protected boolean isUserLevelMethod(@Nullable Method method)
      Determines whether the given Method was declared and defined by the user. A Method is considered a user-level Method if the Method is not an Object class method, is a Bridge Method or is not Method.isSynthetic() nor a Groovy method.
      Parameters:
      method - Method to evaluate.
      Returns:
      a boolean value indicating whether the Method was declared/defined by the user.
      See Also:
    • setBeanClassLoader

      public void setBeanClassLoader(@Nullable ClassLoader beanClassLoader)
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • getBeanClassLoader

      @Nullable protected ClassLoader getBeanClassLoader()
      Returns a reference to the ClassLoader use by the Spring BeanFactory to load classes for bean definitions.
      Returns:
      the ClassLoader used by the Spring BeanFactory to load classes for bean definitions.
      See Also:
    • resolveBeanClassLoader

      @NonNull protected ClassLoader resolveBeanClassLoader()
      Resolves the bean ClassLoader to the configured ClassLoader or the Thread Context ClassLoader.
      Returns:
      the configured ClassLoader or the Thread Context ClassLoader.
      See Also:
    • setBeanFactory

      public void setBeanFactory(@Nullable org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • getBeanFactory

      @NonNull protected org.springframework.beans.factory.BeanFactory getBeanFactory()
      Returns a reference to the Spring BeanFactory in the current application context.
      Returns:
      a reference to the Spring BeanFactory.
      Throws:
      IllegalStateException - if the Spring BeanFactory was not properly configured.
      See Also:
      • BeanFactory
    • setEnvironment

      public void setEnvironment(@Nullable org.springframework.core.env.Environment environment)
      Sets a reference to the Spring Environment.
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
      Parameters:
      environment - Spring Environment.
      See Also:
      • EnvironmentAware.setEnvironment(Environment)
      • Environment
    • getEnvironment

      @Nullable protected org.springframework.core.env.Environment getEnvironment()
      Returns a reference to the Spring Environment.
      Returns:
      a reference to the Spring Environment.
      See Also:
      • Environment
    • getEvaluationContext

      @NonNull protected org.springframework.expression.EvaluationContext getEvaluationContext()
      Returns a reference to the EvaluationContext used to evaluate SpEL expressions.
      Returns:
      a reference to the EvaluationContext used to evaluate SpEL expressions.
      See Also:
      • EvaluationContext
    • getLogger

      @NonNull protected org.slf4j.Logger getLogger()
      Returns a reference to the Logger used by this class to log messages.
      Returns:
      a reference to the Logger used by this class to log messages.
      See Also:
      • Log
    • logDebug

      protected void logDebug(String message, Object... args)
      Logs the message formatted with the array of arguments at debug level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logDebug

      protected void logDebug(Supplier<String> message)
      Logs the message supplied by the given Supplier at debug level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • logInfo

      protected void logInfo(String message, Object... args)
      Logs the message formatted with the array of arguments at info level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logInfo

      protected void logInfo(Supplier<String> message)
      Logs the message supplied by the given Supplier at info level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • logWarning

      protected void logWarning(String message, Object... args)
      Logs the message formatted with the array of arguments at warn level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logWarning

      protected void logWarning(Supplier<String> message)
      Logs the message supplied by the given Supplier at warning level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • logError

      protected void logError(String message, Object... args)
      Logs the message formatted with the array of arguments at error level.
      Parameters:
      message - String containing the message to log.
      args - array of arguments used to format the message.
      See Also:
    • logError

      protected void logError(Supplier<String> message)
      Logs the message supplied by the given Supplier at error level.
      Parameters:
      message - Supplier containing the message and arguments to log.
      See Also:
    • register

      @NonNull protected org.springframework.beans.factory.support.AbstractBeanDefinition register(@NonNull org.springframework.beans.factory.support.AbstractBeanDefinition beanDefinition)
      Registers the AbstractBeanDefinition with the BeanDefinitionRegistry using a generated bean name.
      Parameters:
      beanDefinition - AbstractBeanDefinition to register.
      Returns:
      the given AbstractBeanDefinition.
      See Also:
      • BeanFactory
      • AbstractBeanDefinition
      • BeanDefinitionRegistry
      • BeanDefinitionReaderUtils.registerWithGeneratedName(AbstractBeanDefinition, BeanDefinitionRegistry)
      • getBeanFactory()
    • register

      @NonNull protected org.springframework.beans.factory.support.AbstractBeanDefinition register(@NonNull org.springframework.beans.factory.support.AbstractBeanDefinition beanDefinition, @Nullable org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Registers the AbstractBeanDefinition with the given BeanDefinitionRegistry using a generated bean name.
      Parameters:
      beanDefinition - AbstractBeanDefinition to register.
      registry - BeanDefinitionRegistry used to register the AbstractBeanDefinition.
      Returns:
      the given AbstractBeanDefinition.
      See Also:
      • AbstractBeanDefinition
      • BeanDefinitionRegistry
      • BeanDefinitionReaderUtils.registerWithGeneratedName(AbstractBeanDefinition, BeanDefinitionRegistry)
    • arrayOfPropertyNamesFor

      protected List<String> arrayOfPropertyNamesFor(String propertyNamePrefix)
    • arrayOfPropertyNamesFor

      protected List<String> arrayOfPropertyNamesFor(String propertyNamePrefix, String propertyNameSuffix)
    • asArrayProperty

      protected String asArrayProperty(String propertyNamePrefix, int index, String propertyNameSuffix)
    • cacheProperty

      protected String cacheProperty(String propertyNameSuffix)
    • cacheClientProperty

      protected String cacheClientProperty(String propertyNameSuffix)
    • cacheCompressionProperty

      protected String cacheCompressionProperty(String propertyNameSuffix)
    • cacheOffHeapProperty

      protected String cacheOffHeapProperty(String propertyNameSuffix)
    • cachePeerProperty

      protected String cachePeerProperty(String propertyNameSuffix)
    • cacheServerProperty

      protected String cacheServerProperty(String propertyNameSuffix)
    • namedCacheServerProperty

      protected String namedCacheServerProperty(String name, String propertyNameSuffix)
    • clusterProperty

      protected String clusterProperty(String propertyNameSuffix)
    • diskStoreProperty

      protected String diskStoreProperty(String propertyNameSuffix)
    • namedDiskStoreProperty

      protected String namedDiskStoreProperty(String name, String propertyNameSuffix)
    • entitiesProperty

      protected String entitiesProperty(String propertyNameSuffix)
    • locatorProperty

      protected String locatorProperty(String propertyNameSuffix)
    • loggingProperty

      protected String loggingProperty(String propertyNameSuffix)
    • managementProperty

      protected String managementProperty(String propertyNameSuffix)
    • managerProperty

      protected String managerProperty(String propertyNameSuffix)
    • pdxProperty

      protected String pdxProperty(String propertyNameSuffix)
    • poolProperty

      protected String poolProperty(String propertyNameSuffix)
    • namedPoolProperty

      protected String namedPoolProperty(String name, String propertyNameSuffix)
    • securityProperty

      protected String securityProperty(String propertyNameSuffix)
    • sslProperty

      protected String sslProperty(String propertyNameSuffix)
    • statsProperty

      protected String statsProperty(String propertyNameSuffix)
    • serviceProperty

      protected String serviceProperty(String propertyNameSuffix)
    • memcachedServiceProperty

      protected String memcachedServiceProperty(String propertyNameSuffix)
    • httpServiceProperty

      protected String httpServiceProperty(String propertyNameSuffix)
    • gatewayReceiverProperty

      protected String gatewayReceiverProperty(String propertyNameSuffix)
    • gatewaySenderProperty

      protected String gatewaySenderProperty(String propertyNameSuffix)
    • namedGatewaySenderProperty

      protected String namedGatewaySenderProperty(String name, String propertyNameSuffix)
    • propertyName

      protected String propertyName(String propertyNameSuffix)
      Returns the fully-qualified property name. The fully qualified property name consists of the property name concatenated with the propertyNameSuffix.
      Parameters:
      propertyNameSuffix - String containing the property name suffix concatenated with the base property name.
      Returns:
      the fully-qualified property name.
      See Also:
    • requireProperty

      protected <T> T requireProperty(String propertyName, Class<T> type)
      Resolves the value for the given property identified by name from the Spring Environment as an instance of the specified type.
      Type Parameters:
      T - Class type of the propertyName property's assigned value.
      Parameters:
      propertyName - String containing the name of the required property to resolve.
      type - Class type of the property's assigned value.
      Returns:
      the assigned value of the named property.
      Throws:
      IllegalArgumentException - if the property has not been assigned a value. For String values, this also means the value cannot be empty. For non-String values, this means the value must not be null.
      See Also:
    • resolveAnnotation

      protected <A extends Annotation> A resolveAnnotation(AnnotatedElement annotatedElement, Class<A> annotationType)
      Resolves the Annotation with the given type from the AnnotatedElement.
      Type Parameters:
      A - Subclass type of the resolved Annotation.
      Parameters:
      annotatedElement - AnnotatedElement from which to resolve the Annotation.
      annotationType - type of the Annotation to resolve from the AnnotatedElement.
      Returns:
      the resolved Annotation.
      See Also:
    • resolveBeanClass

      protected Optional<Class<?>> resolveBeanClass(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition, @Nullable org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Resolves the type of the bean defined by the given BeanDefinition.
      Parameters:
      beanDefinition - BeanDefinition defining the bean from which the type is resolved.
      registry - BeanDefinitionRegistry used to resolve the ClassLoader used to resolve the bean's type.
      Returns:
      an Optional Class specifying the resolved type of the bean.
      See Also:
    • resolveBeanClass

      protected Optional<Class<?>> resolveBeanClass(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition, @NonNull org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory)
      Resolves the type of the bean defined by the given BeanDefinition.
      Parameters:
      beanDefinition - BeanDefinition defining the bean from which the type is resolved.
      beanFactory - ConfigurableBeanFactory used to resolve the ClassLoader used to resolve the bean's type.
      Returns:
      an Optional Class specifying the resolved type of the bean.
      See Also:
    • resolveBeanClass

      protected Optional<Class<?>> resolveBeanClass(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition, @Nullable ClassLoader classLoader)
      Resolves the type of the bean defined by the given BeanDefinition.
      Parameters:
      beanDefinition - BeanDefinition defining the bean from which the type is resolved.
      classLoader - ClassLoader used to resolve the bean's type.
      Returns:
      an Optional resolved type of the bean.
      See Also:
    • resolveBeanClassLoader

      @NonNull protected ClassLoader resolveBeanClassLoader(@Nullable org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Attempts to resolve the ClassLoader used by the BeanDefinitionRegistry to load Class definitions of the beans defined in the registry.
      Parameters:
      registry - BeanDefinitionRegistry from which to resolve the ClassLoader.
      Returns:
      the resolved ClassLoader from the BeanDefinitionRegistry or the current Thread's context ClassLoader.
      See Also:
    • resolveBeanClassLoader

      @NonNull protected ClassLoader resolveBeanClassLoader(@Nullable org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory)
      Attempts to resolve the ClassLoader used by the ConfigurableBeanFactory to load Class definitions of the beans created by the factory.
      Parameters:
      beanFactory - ConfigurableBeanFactory from which to resolve the ClassLoader.
      Returns:
      the resolved ClassLoader from the ConfigurableBeanFactory or the current Thread's context ClassLoader.
      See Also:
    • resolveBeanClassName

      protected Optional<String> resolveBeanClassName(@Nullable org.springframework.beans.factory.config.BeanDefinition beanDefinition)
      Resolves the class type name of the bean defined by the given BeanDefinition.
      Parameters:
      beanDefinition - BeanDefinition defining the bean from which to resolve the class type name.
      Returns:
      an Optional String containing the resolved class type name of the bean defined by the given BeanDefinition.
      See Also:
      • BeanDefinition.getBeanClassName()
    • resolveProperty

      protected Boolean resolveProperty(String propertyName, Boolean defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as a Boolean.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected Double resolveProperty(String propertyName, Double defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as an Double.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected Float resolveProperty(String propertyName, Float defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as an Float.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected Integer resolveProperty(String propertyName, Integer defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as an Integer.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected Long resolveProperty(String propertyName, Long defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as a Long.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected String resolveProperty(String propertyName, String defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment as a String.
      Parameters:
      propertyName - name of the property to resolve.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected <T> T resolveProperty(String propertyName, Class<T> targetType)
      Attempts to resolve the property with the given name from the Spring Environment.
      Type Parameters:
      T - Class type of the property value.
      Parameters:
      propertyName - name of the property to resolve.
      targetType - Class type of the property's value.
      Returns:
      the value of the property identified by name or null if the property is not defined or not set.
      See Also:
    • resolveProperty

      protected <T> T resolveProperty(String propertyName, Class<T> targetType, T defaultValue)
      Attempts to resolve the property with the given name from the Spring Environment.
      Type Parameters:
      T - Class type of the property value.
      Parameters:
      propertyName - name of the property to resolve.
      targetType - Class type of the property's value.
      defaultValue - default value to return if the property is not defined or not set.
      Returns:
      the value of the property identified by name or default value if the property is not defined or not set.
      See Also:
    • safeResolveType

      @Nullable protected <T> Class<T> safeResolveType(@NonNull AbstractAnnotationConfigSupport.TypeResolver<T> typeResolver)
      Safely resolves a type returned by the given AbstractAnnotationConfigSupport.TypeResolver where the type resolution might result in a ClassNotFoundException or NoClassDefFoundError.
      Type Parameters:
      T - Class of the type being resolved.
      Parameters:
      typeResolver - AbstractAnnotationConfigSupport.TypeResolver used to resolve a specific type.
      Returns:
      the resolved type or null if the type returned by the AbstractAnnotationConfigSupport.TypeResolver could not be resolved.
      See Also: