Class MapAccessor

java.lang.Object
pro.verron.officestamper.preset.MapAccessor
All Implemented Interfaces:
org.springframework.expression.PropertyAccessor, org.springframework.expression.TargetedAccessor

public class MapAccessor extends Object implements org.springframework.expression.PropertyAccessor
MapAccessor is an implementation of the PropertyAccessor interface, designed for accessing and manipulating properties specifically on Map objects. It provides functionality to read and write entries in a Map based on the property name provided.
  • Constructor Details

    • MapAccessor

      public MapAccessor()
      Constructs a new instance of MapAccessor.
  • Method Details

    • getSpecificTargetClasses

      public Class<?>[] getSpecificTargetClasses()
      Specified by:
      getSpecificTargetClasses in interface org.springframework.expression.TargetedAccessor
    • canRead

      public boolean canRead(org.springframework.expression.EvaluationContext context, @Nullable Object target, String name)
      Specified by:
      canRead in interface org.springframework.expression.PropertyAccessor
    • read

      public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext context, @Nullable Object target, String name) throws org.springframework.expression.AccessException
      Specified by:
      read in interface org.springframework.expression.PropertyAccessor
      Throws:
      org.springframework.expression.AccessException
    • canWrite

      public boolean canWrite(org.springframework.expression.EvaluationContext context, @Nullable Object target, String name)
      Specified by:
      canWrite in interface org.springframework.expression.PropertyAccessor
    • write

      public void write(org.springframework.expression.EvaluationContext context, @Nullable Object target, String name, @Nullable Object newValue)
      Specified by:
      write in interface org.springframework.expression.PropertyAccessor