@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2009 the original author or authors .
* Copyright 2002 - 2014 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -32,6 +32,11 @@ import org.springframework.expression.TypedValue;
@@ -32,6 +32,11 @@ import org.springframework.expression.TypedValue;
* /
public class BeanFactoryAccessor implements PropertyAccessor {
public Class < ? > [ ] getSpecificTargetClasses ( ) {
return new Class < ? > [ ] { BeanFactory . class } ;
}
@Override
public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException {
return ( ( ( BeanFactory ) target ) . containsBean ( name ) ) ;
}
@ -48,8 +53,4 @@ public class BeanFactoryAccessor implements PropertyAccessor {
@@ -48,8 +53,4 @@ public class BeanFactoryAccessor implements PropertyAccessor {
throw new AccessException ( "Beans in a BeanFactory are read-only" ) ;
}
public Class [ ] getSpecificTargetClasses ( ) {
return new Class [ ] { BeanFactory . class } ;
}
}