MCPcopy Create free account
hub / github.com/apache/tomcat / getType

Method getType

java/jakarta/el/BeanNameELResolver.java:95–122  ·  view source on GitHub ↗
(ELContext context, Object base, Object property)

Source from the content-addressed store, hash-verified

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) {

Callers 6

testGetType01Method · 0.95
testGetType02Method · 0.95
testGetType03Method · 0.95
testGetType04Method · 0.95
testGetType05Method · 0.95
doThrowableTestMethod · 0.95

Calls 5

handleThrowableMethod · 0.95
isReadOnlyMethod · 0.65
isNameResolvedMethod · 0.45
getBeanMethod · 0.45
setPropertyResolvedMethod · 0.45

Tested by 6

testGetType01Method · 0.76
testGetType02Method · 0.76
testGetType03Method · 0.76
testGetType04Method · 0.76
testGetType05Method · 0.76
doThrowableTestMethod · 0.76