| 93 | } |
| 94 | |
| 95 | @Override |
| 96 | public Class<?> getType(ELContext context, Object base, Object property) { |
| 97 | Objects.requireNonNull(context); |
| 98 | if (base != null || !(property instanceof String beanName)) { |
| 99 | return null; |
| 100 | } |
| 101 | |
| 102 | try { |
| 103 | if (beanNameResolver.isNameResolved(beanName)) { |
| 104 | Class<?> result = beanNameResolver.getBean(beanName).getClass(); |
| 105 | context.setPropertyResolved(null, property); |
| 106 | |
| 107 | /* |
| 108 | * No resolver level isReadOnly property for this resolver |
| 109 | */ |
| 110 | if (beanNameResolver.isReadOnly((String) property)) { |
| 111 | return null; |
| 112 | } |
| 113 | |
| 114 | return result; |
| 115 | } |
| 116 | } catch (Throwable t) { |
| 117 | Util.handleThrowable(t); |
| 118 | throw new ELException(t); |
| 119 | } |
| 120 | |
| 121 | return null; |
| 122 | } |
| 123 | |
| 124 | @Override |
| 125 | public boolean isReadOnly(ELContext context, Object base, Object property) { |