Class DefaultDiscriminatedConfigurationPropertiesMethodCallProcessor

java.lang.Object
com.broadleafcommerce.common.extension.environment.DefaultDiscriminatedConfigurationPropertiesMethodCallProcessor
All Implemented Interfaces:
DiscriminatedConfigurationPropertiesMethodCallProcessor

public class DefaultDiscriminatedConfigurationPropertiesMethodCallProcessor extends Object implements DiscriminatedConfigurationPropertiesMethodCallProcessor
See Also:
  • Constructor Details

    • DefaultDiscriminatedConfigurationPropertiesMethodCallProcessor

      public DefaultDiscriminatedConfigurationPropertiesMethodCallProcessor(DiscriminatedPropertyAccessor propertyAccessor)
  • Method Details

    • processMethod

      @Nullable public Object processMethod(@NonNull Object configClassInstance, @NonNull Method originalMethod, @NonNull Method proxyMethod, @NonNull Object[] args, @NonNull String key)
      Handle a method call on a ConfigurationProperties annotated bean
      Specified by:
      processMethod in interface DiscriminatedConfigurationPropertiesMethodCallProcessor
      Parameters:
      configClassInstance - The ConfigurationProperties annotated bean instance
      originalMethod - The method in the superClass being proxied
      proxyMethod - The method being called
      args - The args being passed
      key - The ConfigurationProperties.prefix() value from the bean instance
      Returns:
      The result of the method call - possibly a discriminated property value
    • getNestedProxy

      @NonNull protected Object getNestedProxy(@Nullable Object delegate, @NonNull Class<?> type, @NonNull String key)
    • getField

      @NonNull protected com.broadleafcommerce.common.extension.environment.DefaultDiscriminatedConfigurationPropertiesMethodCallProcessor.FieldInfo getField(@NonNull Object configInstance, @NonNull Method method)