@@ -0,0 +1,2934 @@
+/*%0A * Copyright 2015 Michael Rozumyanskiy%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage io.michaelrocks.lightsaber.processor.signature;%0A%0Aimport org.apache.commons.lang3.builder.EqualsBuilder;%0Aimport org.apache.commons.lang3.builder.HashCodeBuilder;%0Aimport org.apache.commons.lang3.builder.ToStringBuilder;%0Aimport org.objectweb.asm.Type;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Apublic class MethodSignature %7B%0A    private final TypeSignature returnType;%0A    private final List%3CTypeSignature%3E argumentTypes;%0A%0A    public MethodSignature(final Type methodType) %7B%0A        this.returnType = getReturnTypeSignature(methodType);%0A        this.argumentTypes = Collections.unmodifiableList(getArgumentTypesSignatures(methodType));%0A    %7D%0A%0A    public MethodSignature(final TypeSignature returnType, final List%3CTypeSignature%3E argumentTypes) %7B%0A        this.returnType = returnType;%0A        this.argumentTypes = Collections.unmodifiableList(new ArrayList%3C%3E(argumentTypes));%0A    %7D%0A%0A    private static TypeSignature getReturnTypeSignature(final Type methodType) %7B%0A        return new TypeSignature(methodType.getReturnType());%0A    %7D%0A%0A    private static List%3CTypeSignature%3E getArgumentTypesSignatures(final Type methodType) %7B%0A        final ArrayList%3CTypeSignature%3E argumentTypes = new ArrayList%3C%3E();%0A        for (final Type argumentType : methodType.getArgumentTypes()) %7B%0A            argumentTypes.add(new TypeSignature(argumentType));%0A        %7D%0A        return argumentTypes;%0A    %7D%0A%0A    @Override%0A    public boolean equals(final Object object) %7B%0A        if (this == object) %7B%0A            return true;%0A        %7D%0A%0A        if (object == null %7C%7C getClass() != object.getClass()) %7B%0A            return false;%0A        %7D%0A%0A        final MethodSignature that = (MethodSignature) object;%0A        return new EqualsBuilder()%0A                .append(returnType, that.returnType)%0A                .append(argumentTypes, that.argumentTypes)%0A                .isEquals();%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return new HashCodeBuilder(17, 37)%0A                .append(returnType)%0A                .append(argumentTypes)%0A                .toHashCode();%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return new ToStringBuilder(this)%0A                .append(%22returnType%22, returnType)%0A                .append(%22argumentTypes%22, argumentTypes)%0A                .toString();%0A    %7D%0A%7D%0A

Add MethodSignature type