@@ -209,10 +209,6 @@ class EvaluationContextExtensionInformation {
|
||||
this.staticOnly = staticOnly;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.util.ReflectionUtils.MethodFilter#matches(java.lang.reflect.Method)
|
||||
*/
|
||||
@Override
|
||||
public boolean matches(Method method) {
|
||||
|
||||
@@ -226,10 +222,6 @@ class EvaluationContextExtensionInformation {
|
||||
return Modifier.isPublic(method.getModifiers()) && staticMatch;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.util.ReflectionUtils.FieldFilter#matches(java.lang.reflect.Field)
|
||||
*/
|
||||
@Override
|
||||
public boolean matches(Field field) {
|
||||
|
||||
|
||||
@@ -161,19 +161,11 @@ public class ExpressionDependencies implements Streamable<ExpressionDependencies
|
||||
return new ExpressionDependencies(new ArrayList<>(dependencySet));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<ExpressionDependency> iterator() {
|
||||
return this.dependencies.iterator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@@ -185,10 +177,6 @@ public class ExpressionDependencies implements Streamable<ExpressionDependencies
|
||||
return ObjectUtils.nullSafeEquals(dependencies, that.dependencies);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(dependencies);
|
||||
@@ -263,10 +251,6 @@ public class ExpressionDependencies implements Streamable<ExpressionDependencies
|
||||
return symbol;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@@ -284,10 +268,6 @@ public class ExpressionDependencies implements Streamable<ExpressionDependencies
|
||||
return ObjectUtils.nullSafeEquals(symbol, that.symbol);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
var result = ObjectUtils.nullSafeHashCode(type);
|
||||
@@ -296,10 +276,6 @@ public class ExpressionDependencies implements Streamable<ExpressionDependencies
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExpressionDependency{" + "type=" + type + ", symbol='" + symbol + '\'' + ", nestLevel=" + nestLevel + '}';
|
||||
|
||||
@@ -100,19 +100,11 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
this.extensions = extensions;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.spel.EvaluationContextProvider#getEvaluationContext(Object)
|
||||
*/
|
||||
@Override
|
||||
public StandardEvaluationContext getEvaluationContext(Object rootObject) {
|
||||
return doGetEvaluationContext(rootObject, getExtensions(Predicates.isTrue()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.spel.EvaluationContextProvider#getEvaluationContext(Object, ExpressionDependencies)
|
||||
*/
|
||||
@Override
|
||||
public StandardEvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies) {
|
||||
return doGetEvaluationContext(rootObject, getExtensions(it -> dependencies.stream().anyMatch(it::provides)));
|
||||
@@ -226,10 +218,6 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
Collections.reverse(this.adapters);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.ExtensionAwareEvaluationContextProvider.ReadOnlyPropertyAccessor#canRead(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean canRead(EvaluationContext context, @Nullable Object target, String name) {
|
||||
|
||||
@@ -244,10 +232,6 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
return adapters.stream().anyMatch(it -> it.getProperties().containsKey(name));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#read(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public TypedValue read(EvaluationContext context, @Nullable Object target, String name) {
|
||||
|
||||
@@ -265,10 +249,6 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
.findFirst().orElse(TypedValue.NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.MethodResolver#resolve(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String, java.util.List)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public MethodExecutor resolve(EvaluationContext context, @Nullable Object target, final String name,
|
||||
@@ -283,28 +263,16 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#canWrite(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean canWrite(EvaluationContext context, @Nullable Object target, String name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#write(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void write(EvaluationContext context, @Nullable Object target, String name, @Nullable Object newValue) {
|
||||
// noop
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#getSpecificTargetClasses()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<?>[] getSpecificTargetClasses() {
|
||||
@@ -363,10 +331,6 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
this.function = function;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.MethodExecutor#execute(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException {
|
||||
|
||||
|
||||
@@ -70,38 +70,22 @@ public class ReactiveExtensionAwareEvaluationContextProvider implements Reactive
|
||||
evaluationContextProvider = new ExtensionAwareEvaluationContextProvider(extensions);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.spel.EvaluationContextProvider#getEvaluationContext(Object)
|
||||
*/
|
||||
@Override
|
||||
public EvaluationContext getEvaluationContext(Object rootObject) {
|
||||
return evaluationContextProvider.getEvaluationContext(rootObject);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.spel.EvaluationContextProvider#getEvaluationContext(java.lang.Object, org.springframework.data.spel.ExpressionDependencies)
|
||||
*/
|
||||
@Override
|
||||
public EvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies) {
|
||||
return evaluationContextProvider.getEvaluationContext(rootObject, dependencies);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.spel.ReactiveEvaluationContextProvider#getEvaluationContextLater(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Mono<StandardEvaluationContext> getEvaluationContextLater(Object rootObject) {
|
||||
return getExtensions(Predicates.isTrue()) //
|
||||
.map(it -> evaluationContextProvider.doGetEvaluationContext(rootObject, it));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.spel.ReactiveEvaluationContextProvider#getEvaluationContextLater(java.lang.Object, org.springframework.data.spel.ExpressionDependencies)
|
||||
*/
|
||||
@Override
|
||||
public Mono<StandardEvaluationContext> getEvaluationContextLater(Object rootObject,
|
||||
ExpressionDependencies dependencies) {
|
||||
|
||||
Reference in New Issue
Block a user