Class BaseParamAspect

java.lang.Object
software.amazon.lambda.powertools.parameters.BaseParamAspect

public abstract class BaseParamAspect extends Object
Provides a common base for all parameter aspects. This lets us group functionality that we need to reimplement in each aspect. This class should be extended for each additional parameter aspect.
  • Constructor Details

    • BaseParamAspect

      public BaseParamAspect()
  • Method Details

    • getAndTransform

      protected Object getAndTransform(String key, Class<? extends Transformer> transformer, BaseProvider provider, org.aspectj.lang.reflect.FieldSignature fieldSignature)
      Gets the parameter value from the provider and transforms it if necessary. This transformation is generic across all parameter providers.
      Parameters:
      key - The key of the parameter to get
      transformer - The transformer to use to transform the parameter value
      provider - A concrete instance of the parameter provider to retrieve the value from
      fieldSignature - The signature of the field that the parameter is being injected into
      Returns:
      The value of the parameter, transformed if necessary