@@ -0,0 +1,2209 @@
+/*%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.descriptors;%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%0Apublic class EnumValueDescriptor %7B%0A    private final Type type;%0A    private final String value;%0A%0A    public EnumValueDescriptor(final Type type, final String value) %7B%0A        this.type = type;%0A        this.value = value;%0A    %7D%0A%0A    public static EnumValueDescriptor from(final String desc, final String value) %7B%0A        return new EnumValueDescriptor(Type.getType(desc), value);%0A    %7D%0A%0A    public Type getType() %7B%0A        return type;%0A    %7D%0A%0A    public String getValue() %7B%0A        return value;%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 EnumValueDescriptor that = (EnumValueDescriptor) object;%0A        return new EqualsBuilder()%0A                .append(type, that.type)%0A                .append(value, that.value)%0A                .isEquals();%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return new HashCodeBuilder(17, 37)%0A                .append(type)%0A                .append(value)%0A                .toHashCode();%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return new ToStringBuilder(this)%0A                .append(%22type%22, type)%0A                .append(%22value%22, value)%0A                .toString();%0A    %7D%0A%7D%0A

Implement a descriptor for enum values