Remove all deprecated OBJECT$ usages from project code

This commit is contained in:
Pavel V. Talanov
2015-02-17 18:00:26 +03:00
parent 48a6fb37f9
commit d6a942a574
39 changed files with 61 additions and 57 deletions
@@ -39,7 +39,7 @@ public class JavaAnnotationImpl extends JavaElementImpl<PsiAnnotation> implement
@Nullable
public JavaAnnotationArgument findArgument(@NotNull Name name) {
PsiAnnotationMemberValue attribute = getPsi().findAttributeValue(name.asString());
return attribute == null ? null : JavaAnnotationArgumentImpl.OBJECT$.create(attribute, name);
return attribute == null ? null : JavaAnnotationArgumentImpl.Factory.create(attribute, name);
}
@Override
@@ -120,7 +120,7 @@ public class JavaElementCollectionFromPsiArrayUtil {
String name = psiNameValuePair.getName();
PsiAnnotationMemberValue value = psiNameValuePair.getValue();
assert value != null : "Annotation argument value cannot be null: " + name;
return JavaAnnotationArgumentImpl.OBJECT$.create(value, name == null ? null : Name.identifier(name));
return JavaAnnotationArgumentImpl.Factory.create(value, name == null ? null : Name.identifier(name));
}
};
}
@@ -37,7 +37,7 @@ public class JavaPropertyInitializerEvaluatorImpl implements JavaPropertyInitial
if (evaluatedExpression != null) {
return ConstantsPackage.createCompileTimeConstant(
evaluatedExpression,
ConstantExpressionEvaluator.OBJECT$.isPropertyCompileTimeConstant(descriptor),
ConstantExpressionEvaluator.isPropertyCompileTimeConstant(descriptor),
false,
true,
descriptor.getType());
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.name.Name
abstract class JavaAnnotationArgumentImpl(
override val name: Name?
) : JavaAnnotationArgument {
class object {
class object Factory {
fun create(argument: PsiAnnotationMemberValue, name: Name?): JavaAnnotationArgument {
val value = JavaPsiFacade.getInstance(argument.getProject()).getConstantEvaluationHelper().computeConstantExpression(argument)
if (value is Enum<*>) {
@@ -63,7 +63,7 @@ public final class KotlinBinaryClassCache implements Disposable {
@Override
public VirtualFileKotlinClass compute() {
//noinspection deprecation
return VirtualFileKotlinClass.OBJECT$.create(file);
return VirtualFileKotlinClass.Factory.create(file);
}
});
@@ -46,7 +46,7 @@ public class VirtualFileKotlinClass private(
override fun hashCode() = file.hashCode()
override fun toString() = "${javaClass.getSimpleName()}: $file"
class object {
class object Factory {
private val LOG = Logger.getInstance(javaClass<VirtualFileKotlinClass>())
deprecated("Use KotlinBinaryClassCache")