@@ -0,0 +1,2950 @@
+/*%0A * Copyright 2020, TeamDev. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.server.entity;%0A%0Aimport com.google.common.base.Objects;%0Aimport com.google.common.flogger.LogSite;%0Aimport com.google.errorprone.annotations.Immutable;%0Aimport io.spine.code.java.ClassName;%0A%0Aimport java.lang.reflect.Method;%0Aimport java.util.stream.Stream;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull;%0Aimport static java.lang.String.format;%0Aimport static java.util.stream.Collectors.joining;%0A%0A@Immutable%0Afinal class HandlerMethodSite extends LogSite %7B%0A%0A    private final String fileName;%0A    private final ClassName name;%0A    private final String methodName;%0A%0A    HandlerMethodSite(Method method) %7B%0A        checkNotNull(method);%0A        this.name = ClassName.of(method.getDeclaringClass());%0A        this.fileName = name.topLevelClass().value();%0A        String params = Stream.of(method.getParameterTypes())%0A                              .map(Class::getSimpleName)%0A                              .collect(joining(%22, %22));%0A        this.methodName = format(%22%25s(%25s)%22, method.getName(), params);%0A    %7D%0A%0A    @Override%0A    public String getClassName() %7B%0A        return name.canonicalName();%0A    %7D%0A%0A    @Override%0A    public String getMethodName() %7B%0A        return methodName;%0A    %7D%0A%0A    @Override%0A    public int getLineNumber() %7B%0A        return UNKNOWN_LINE;%0A    %7D%0A%0A    @Override%0A    public String getFileName() %7B%0A        return fileName;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) %7B%0A            return true;%0A        %7D%0A        if (!(o instanceof HandlerMethodSite)) %7B%0A            return false;%0A        %7D%0A        HandlerMethodSite site = (HandlerMethodSite) o;%0A        return Objects.equal(getFileName(), site.getFileName()) &&%0A                Objects.equal(name, site.name) &&%0A                Objects.equal(getMethodName(), site.getMethodName());%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hashCode(getFileName(), name, getMethodName());%0A    %7D%0A%7D%0A

Implement HandlerMethodSite