Drop JavaClassValue and it's usages

Also drop related testData
This commit is contained in:
Denis Zharkov
2015-06-09 17:46:15 +03:00
parent 980499e331
commit d71fe0d11a
16 changed files with 5 additions and 189 deletions
@@ -49,8 +49,6 @@ public interface AnnotationArgumentVisitor<R, D> {
R visitAnnotationValue(AnnotationValue value, D data);
R visitJavaClassValue(JavaClassValue value, D data);
R visitKClassValue(KClassValue value, D data);
R visitNumberTypeValue(IntegerValueTypeConstant value, D data);
@@ -93,11 +93,6 @@ public abstract class DefaultAnnotationArgumentVisitor<R, D> implements Annotati
return visitValue(value, data);
}
@Override
public R visitJavaClassValue(JavaClassValue value, D data) {
return visitValue(value, data);
}
@Override
public R visitNumberTypeValue(IntegerValueTypeConstant value, D data) {
return visitValue(value, data);
@@ -372,7 +372,6 @@ internal class DescriptorRendererImpl(
return when (value) {
is ArrayValue -> value.getValue().map { renderConstant(it) }.joinToString(", ", "{", "}")
is AnnotationValue -> renderAnnotation(value.getValue())
is JavaClassValue -> "javaClass<" + renderType(value.getValue()) + ">()"
is KClassValue -> renderType(value.getValue()) + "::class"
else -> value.toString()
}
@@ -1,51 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.resolve.constants;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
import org.jetbrains.kotlin.descriptors.annotations.AnnotationArgumentVisitor;
import org.jetbrains.kotlin.types.JetType;
public class JavaClassValue extends CompileTimeConstant<JetType> {
public JavaClassValue(@NotNull JetType value) {
super(value, true, false, false);
}
@NotNull
@Override
public JetType getValue() {
return value.getArguments().iterator().next().getType();
}
@NotNull
@Override
public JetType getType(@NotNull KotlinBuiltIns kotlinBuiltIns) {
return value;
}
@Override
public <R, D> R accept(AnnotationArgumentVisitor<R, D> visitor, D data) {
return visitor.visitJavaClassValue(this, data);
}
@Override
public String toString() {
return getValue() + ".class";
}
}