Transform Enum.values to property

This commit is contained in:
Denis Zharkov
2015-10-16 14:20:19 +03:00
parent d985f56b8d
commit d8ede6d03e
17 changed files with 140 additions and 29 deletions
@@ -176,10 +176,8 @@ public class CodegenUtil {
&& JetTypeChecker.DEFAULT.isSubtypeOf(methodTypeParameters.get(0).getType(), nullableString);
}
public static boolean isEnumValuesMethod(@NotNull FunctionDescriptor functionDescriptor) {
List<ValueParameterDescriptor> methodTypeParameters = functionDescriptor.getValueParameters();
return DescriptorUtils.ENUM_VALUES.equals(functionDescriptor.getName())
&& methodTypeParameters.isEmpty();
public static boolean isEnumValuesProperty(@NotNull VariableDescriptor propertyDescriptor) {
return DescriptorUtils.ENUM_VALUES.equals(propertyDescriptor.getName());
}
@Nullable