Class SpringBeanReferenceResolver

java.lang.Object
org.citrusframework.context.SpringBeanReferenceResolver
All Implemented Interfaces:
org.citrusframework.spi.ReferenceRegistry, org.citrusframework.spi.ReferenceResolver, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SpringBeanReferenceResolver extends Object implements org.citrusframework.spi.ReferenceResolver, org.springframework.context.ApplicationContextAware
Spring bean reference resolver operates on given application context to resolve bean references.
Since:
2.5
Author:
Christoph Deppisch
  • Constructor Details

    • SpringBeanReferenceResolver

      public SpringBeanReferenceResolver()
      Default constructor.
    • SpringBeanReferenceResolver

      public SpringBeanReferenceResolver(org.springframework.context.ApplicationContext applicationContext)
      Constructor initializes with given application context.
      Parameters:
      applicationContext -
  • Method Details

    • resolve

      public <T> T resolve(Class<T> requiredType)
      Specified by:
      resolve in interface org.citrusframework.spi.ReferenceResolver
    • resolve

      public <T> T resolve(String name, Class<T> type)
      Specified by:
      resolve in interface org.citrusframework.spi.ReferenceResolver
    • resolve

      public Object resolve(String name)
      Specified by:
      resolve in interface org.citrusframework.spi.ReferenceResolver
    • resolveAll

      public <T> Map<String,T> resolveAll(Class<T> requiredType)
      Specified by:
      resolveAll in interface org.citrusframework.spi.ReferenceResolver
    • isResolvable

      public boolean isResolvable(String name)
      Specified by:
      isResolvable in interface org.citrusframework.spi.ReferenceResolver
    • isResolvable

      public boolean isResolvable(Class<?> type)
      Specified by:
      isResolvable in interface org.citrusframework.spi.ReferenceResolver
    • isResolvable

      public boolean isResolvable(String name, Class<?> type)
      Specified by:
      isResolvable in interface org.citrusframework.spi.ReferenceResolver
    • withFallback

      public SpringBeanReferenceResolver withFallback(org.citrusframework.spi.ReferenceResolver fallback)
      Specifies the fallback.
      Parameters:
      fallback -
    • bind

      public void bind(String name, Object value)
      Specified by:
      bind in interface org.citrusframework.spi.ReferenceRegistry
    • registerTypeAliasResolver

      public void registerTypeAliasResolver(String name, org.citrusframework.context.resolver.TypeAliasResolver<?,?> aliasResolver)
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setFallback

      public void setFallback(org.citrusframework.spi.ReferenceResolver fallback)
      Specifies the fallback.
      Parameters:
      fallback -
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
      Obtains the applicationContext.
      Returns: