Package org.thymeleaf.spring5.expression
Class SPELContextPropertyAccessor
- Object
-
- org.thymeleaf.spring5.expression.SPELContextPropertyAccessor
-
- All Implemented Interfaces:
org.springframework.expression.PropertyAccessor
public final class SPELContextPropertyAccessor extends Object implements org.springframework.expression.PropertyAccessor
Property accessor used for allowing Spring EL expression evaluators treat
IContextobjects correctly (map keys will be accessible as object properties).Note that, even if
IContextobjects used as expression roots will be accessible asjava.util.Maps thanks toSPELContextMapWrapper, this property accessor class is still needed in order to access nested context info like thesessionorparammaps in web contexts.- Since:
- 3.0.3
- Author:
- Daniel Fernández
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRead(org.springframework.expression.EvaluationContext context, Object target, String name)booleancanWrite(org.springframework.expression.EvaluationContext context, Object target, String name)Class<?>[]getSpecificTargetClasses()org.springframework.expression.TypedValueread(org.springframework.expression.EvaluationContext evaluationContext, Object target, String name)voidwrite(org.springframework.expression.EvaluationContext context, Object target, String name, Object newValue)
-
-
-
Method Detail
-
getSpecificTargetClasses
public Class<?>[] getSpecificTargetClasses()
- Specified by:
getSpecificTargetClassesin interfaceorg.springframework.expression.PropertyAccessor
-
canRead
public boolean canRead(org.springframework.expression.EvaluationContext context, Object target, String name) throws org.springframework.expression.AccessException- Specified by:
canReadin interfaceorg.springframework.expression.PropertyAccessor- Throws:
org.springframework.expression.AccessException
-
read
public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext evaluationContext, Object target, String name) throws org.springframework.expression.AccessException- Specified by:
readin interfaceorg.springframework.expression.PropertyAccessor- Throws:
org.springframework.expression.AccessException
-
canWrite
public boolean canWrite(org.springframework.expression.EvaluationContext context, Object target, String name) throws org.springframework.expression.AccessException- Specified by:
canWritein interfaceorg.springframework.expression.PropertyAccessor- Throws:
org.springframework.expression.AccessException
-
write
public void write(org.springframework.expression.EvaluationContext context, Object target, String name, Object newValue) throws org.springframework.expression.AccessException- Specified by:
writein interfaceorg.springframework.expression.PropertyAccessor- Throws:
org.springframework.expression.AccessException
-
-