DATACMNS-1726 - Delombok source files.
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.projection;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -29,6 +27,8 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.core.type.MethodMetadata;
|
||||
import org.springframework.data.type.MethodsMetadata;
|
||||
@@ -128,9 +128,10 @@ class DefaultProjectionInformation implements ProjectionInformation {
|
||||
* @since 2.1
|
||||
* @soundtrack The Meters - Cissy Strut (Here Comes The Meter Man)
|
||||
*/
|
||||
@Slf4j
|
||||
private static class PropertyDescriptorSource {
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(PropertyDescriptorSource.class);
|
||||
|
||||
private final Class<?> type;
|
||||
private final Optional<MethodsMetadata> metadata;
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.projection;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -25,6 +22,8 @@ import javax.annotation.Nullable;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
@@ -33,10 +32,16 @@ import org.springframework.util.ReflectionUtils;
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
class MapAccessingMethodInterceptor implements MethodInterceptor {
|
||||
|
||||
private final @NonNull Map<String, Object> map;
|
||||
private final Map<String, Object> map;
|
||||
|
||||
MapAccessingMethodInterceptor(Map<String, Object> map) {
|
||||
|
||||
Assert.notNull(map, "Map must not be null");
|
||||
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.projection;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -30,6 +27,7 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.core.CollectionFactory;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
@@ -47,12 +45,19 @@ import org.springframework.util.ObjectUtils;
|
||||
* @author Mark Paluch
|
||||
* @since 1.10
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
class ProjectingMethodInterceptor implements MethodInterceptor {
|
||||
|
||||
private final @NonNull ProjectionFactory factory;
|
||||
private final @NonNull MethodInterceptor delegate;
|
||||
private final @NonNull ConversionService conversionService;
|
||||
private final ProjectionFactory factory;
|
||||
private final MethodInterceptor delegate;
|
||||
private final ConversionService conversionService;
|
||||
|
||||
ProjectingMethodInterceptor(ProjectionFactory factory, MethodInterceptor delegate,
|
||||
ConversionService conversionService) {
|
||||
|
||||
this.factory = factory;
|
||||
this.delegate = delegate;
|
||||
this.conversionService = conversionService;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.Map;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.expression.BeanFactoryResolver;
|
||||
@@ -34,6 +35,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -144,10 +146,71 @@ class SpelEvaluatingMethodInterceptor implements MethodInterceptor {
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@lombok.Value(staticConstructor = "of")
|
||||
static class TargetWrapper {
|
||||
static final class TargetWrapper {
|
||||
|
||||
Object target;
|
||||
Object[] args;
|
||||
private final Object target;
|
||||
private final Object[] args;
|
||||
|
||||
private TargetWrapper(Object target, Object[] args) {
|
||||
this.target = target;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public static TargetWrapper of(Object target, Object[] args) {
|
||||
return new TargetWrapper(target, args);
|
||||
}
|
||||
|
||||
public Object getTarget() {
|
||||
return this.target;
|
||||
}
|
||||
|
||||
public Object[] getArgs() {
|
||||
return this.args;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(o instanceof TargetWrapper)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TargetWrapper that = (TargetWrapper) o;
|
||||
|
||||
if (!ObjectUtils.nullSafeEquals(target, that.target)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ObjectUtils.nullSafeEquals(args, that.args);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = ObjectUtils.nullSafeHashCode(target);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(args);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SpelEvaluatingMethodInterceptor.TargetWrapper(target=" + this.getTarget() + ", args="
|
||||
+ java.util.Arrays.deepToString(this.getArgs()) + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user