From 2d732ba39881045511799635d3e0e772205a9f2d Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Sat, 16 Aug 2008 01:41:13 +0000 Subject: [PATCH] javadoc --- .../expression/CacheablePropertyAccessor.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/org.springframework.expression/src/main/java/org/springframework/expression/CacheablePropertyAccessor.java b/org.springframework.expression/src/main/java/org/springframework/expression/CacheablePropertyAccessor.java index 4e654b5490..7567da41bb 100644 --- a/org.springframework.expression/src/main/java/org/springframework/expression/CacheablePropertyAccessor.java +++ b/org.springframework.expression/src/main/java/org/springframework/expression/CacheablePropertyAccessor.java @@ -1,22 +1,21 @@ package org.springframework.expression; -// TODO (asc) Do we need a 'caching is allowed' option to be configurable at parse time? /** - * A CacheablePropertyAccessor is an optimized PropertyAccessor where the two parts of accessing the - * property are separated: (1) resolving the property and (2) retrieving its value. In some cases there is - * a large cost to discovering which property an expression refers to and once discovered it will - * always resolve to the same property. In these situations a CacheablePropertyAccessor enables the - * resolution to be done once and a reusable object (an executor) returned that can be called over and - * over to retrieve the property value without going through resolution again. + * A CacheablePropertyAccessor is an optimized PropertyAccessor where the two parts of accessing the property are + * separated: (1) resolving the property and (2) retrieving its value. In some cases there is a large cost to + * discovering which property an expression refers to and once discovered it will always resolve to the same property. + * In these situations a CacheablePropertyAccessor enables the resolution to be done once and a reusable object (an + * executor) returned that can be called over and over to retrieve the property value without going through resolution + * again. *

- * + * * @author Andy Clement */ public abstract class CacheablePropertyAccessor implements PropertyAccessor { /** - * Attempt to resolve the named property and return an executor that can be called to - * get the value of that property. Return null if the property cannot be resolved. + * Attempt to resolve the named property and return an executor that can be called to get the value of that + * property. Return null if the property cannot be resolved. * * @param context the evaluation context * @param target the target upon which the property is being accessed @@ -26,8 +25,8 @@ public abstract class CacheablePropertyAccessor implements PropertyAccessor { public abstract PropertyReaderExecutor getReaderAccessor(EvaluationContext context, Object target, Object name); /** - * Attempt to resolve the named property and return an executor that can be called to - * set the value of that property. Return null if the property cannot be resolved. + * Attempt to resolve the named property and return an executor that can be called to set the value of that + * property. Return null if the property cannot be resolved. * * @param context the evaluation context * @param target the target upon which the property is being accessed @@ -37,21 +36,22 @@ public abstract class CacheablePropertyAccessor implements PropertyAccessor { public abstract PropertyWriterExecutor getWriterAccessor(EvaluationContext context, Object target, Object name); // Implementation of PropertyAccessor follows, based on the resolver/executor model - + public final boolean canRead(EvaluationContext context, Object target, Object name) throws AccessException { - return getReaderAccessor(context,target,name) != null; + return getReaderAccessor(context, target, name) != null; } public final boolean canWrite(EvaluationContext context, Object target, Object name) throws AccessException { - return getWriterAccessor(context,target,name) != null; + return getWriterAccessor(context, target, name) != null; } public final Object read(EvaluationContext context, Object target, Object name) throws AccessException { - return getReaderAccessor(context,target,name).execute(context,target); + return getReaderAccessor(context, target, name).execute(context, target); } - public final void write(EvaluationContext context, Object target, Object name, Object newValue) throws AccessException { - getWriterAccessor(context,target,name).execute(context,target,newValue); + public final void write(EvaluationContext context, Object target, Object name, Object newValue) + throws AccessException { + getWriterAccessor(context, target, name).execute(context, target, newValue); } }