|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2009 the original author or authors. |
| 2 | + * Copyright 2002-2012 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
30 | 30 | import org.springframework.util.Assert;
|
31 | 31 |
|
32 | 32 | /**
|
33 |
| - * A SpelExpressions represents a parsed (valid) expression that is ready to be evaluated in a specified context. An |
34 |
| - * expression can be evaluated standalone or in a specified context. During expression evaluation the context may be |
35 |
| - * asked to resolve references to types, beans, properties, methods. |
| 33 | + * A {@code SpelExpression} represents a parsed (valid) expression that is ready |
| 34 | + * to be evaluated in a specified context. An expression can be evaluated |
| 35 | + * standalone or in a specified context. During expression evaluation the context |
| 36 | + * may be asked to resolve references to types, beans, properties, and methods. |
36 | 37 | *
|
37 | 38 | * @author Andy Clement
|
38 | 39 | * @since 3.0
|
@@ -103,22 +104,22 @@ public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> exp
|
103 | 104 | return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType);
|
104 | 105 | }
|
105 | 106 |
|
106 |
| - public Class getValueType() throws EvaluationException { |
| 107 | + public Class<?> getValueType() throws EvaluationException { |
107 | 108 | return getValueType(getEvaluationContext());
|
108 | 109 | }
|
109 | 110 |
|
110 |
| - public Class getValueType(Object rootObject) throws EvaluationException { |
| 111 | + public Class<?> getValueType(Object rootObject) throws EvaluationException { |
111 | 112 | return getValueType(getEvaluationContext(), rootObject);
|
112 | 113 | }
|
113 | 114 |
|
114 |
| - public Class getValueType(EvaluationContext context) throws EvaluationException { |
| 115 | + public Class<?> getValueType(EvaluationContext context) throws EvaluationException { |
115 | 116 | Assert.notNull(context, "The EvaluationContext is required");
|
116 | 117 | ExpressionState eState = new ExpressionState(context, configuration);
|
117 | 118 | TypeDescriptor typeDescriptor = ast.getValueInternal(eState).getTypeDescriptor();
|
118 | 119 | return typeDescriptor != null ? typeDescriptor.getType() : null;
|
119 | 120 | }
|
120 | 121 |
|
121 |
| - public Class getValueType(EvaluationContext context, Object rootObject) throws EvaluationException { |
| 122 | + public Class<?> getValueType(EvaluationContext context, Object rootObject) throws EvaluationException { |
122 | 123 | ExpressionState eState = new ExpressionState(context, toTypedValue(rootObject), configuration);
|
123 | 124 | TypeDescriptor typeDescriptor = ast.getValueInternal(eState).getTypeDescriptor();
|
124 | 125 | return typeDescriptor != null ? typeDescriptor.getType() : null;
|
|
0 commit comments