Minor. rename getObjectType to getCompanionObjectType

This commit is contained in:
Stanislav Erokhin
2015-11-16 16:40:44 +03:00
parent c7f7ba72b8
commit b4fe62e53e
6 changed files with 20 additions and 20 deletions
@@ -426,7 +426,7 @@ public abstract class AnnotationCodegen {
for (ConstantValue<?> value : values) {
if (value instanceof EnumValue) {
ClassDescriptor enumEntry = ((EnumValue) value).getValue();
KotlinType classObjectType = DescriptorUtilsKt.getClassObjectType(enumEntry);
KotlinType classObjectType = DescriptorUtilsKt.getCompanionObjectType(enumEntry);
if (classObjectType != null) {
if ("java/lang/annotation/ElementType".equals(typeMapper.mapType(classObjectType).getInternalName())) {
result.add(ElementType.valueOf(enumEntry.getName().asString()));
@@ -454,7 +454,7 @@ public abstract class AnnotationCodegen {
ConstantValue<?> compileTimeConstant = valueArguments.iterator().next();
if (compileTimeConstant instanceof EnumValue) {
ClassDescriptor enumEntry = ((EnumValue) compileTimeConstant).getValue();
KotlinType classObjectType = DescriptorUtilsKt.getClassObjectType(enumEntry);
KotlinType classObjectType = DescriptorUtilsKt.getCompanionObjectType(enumEntry);
if (classObjectType != null) {
if ("java/lang/annotation/RetentionPolicy".equals(typeMapper.mapType(classObjectType).getInternalName())) {
return RetentionPolicy.valueOf(enumEntry.getName().asString());