@@ -0,0 +1,3058 @@
+/*%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.annotations;%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.Map;%0A%0Apublic class AnnotationDescriptor %7B%0A    private final Type type;%0A    private final Map%3CString, Object%3E values;%0A    private final boolean resolved;%0A%0A    AnnotationDescriptor(final Type type, final Map%3CString, Object%3E values, final boolean resolved) %7B%0A        this.type = type;%0A        this.values = values;%0A        this.resolved = resolved;%0A    %7D%0A%0A    public Type getType() %7B%0A        return type;%0A    %7D%0A%0A    public Map%3CString, Object%3E getValues() %7B%0A        return values;%0A    %7D%0A%0A    public boolean isResolved() %7B%0A        return resolved;%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 AnnotationDescriptor that = (AnnotationDescriptor) object;%0A        final EqualsBuilder equalsBuilder = new EqualsBuilder()%0A                .append(type, that.type)%0A                .append(values.size(), that.values.size());%0A        if (!equalsBuilder.isEquals()) %7B%0A            return false;%0A        %7D%0A%0A        for (final Map.Entry%3CString, Object%3E entry : values.entrySet()) %7B%0A            equalsBuilder%0A                    .append(true, that.getValues().containsKey(entry.getKey()))%0A                    .append(entry.getValue(), that.getValues().get(entry.getKey()));%0A            if (!equalsBuilder.isEquals()) %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        final HashCodeBuilder hashCodeBuilder = new HashCodeBuilder(17, 37)%0A                .append(type);%0A        final HashCodeBuilder mapHashCodeBuilder = new HashCodeBuilder(1, 1);%0A        for (final Map.Entry%3CString, Object%3E entry : values.entrySet()) %7B%0A            mapHashCodeBuilder.append(entry.getValue());%0A        %7D%0A        return hashCodeBuilder%0A                .append(mapHashCodeBuilder.build())%0A                .build();%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return new ToStringBuilder(this)%0A                .append(%22type%22, type)%0A                .append(%22values%22, values)%0A                .toString();%0A    %7D%0A%7D%0A

Add a descriptor class for annotations