Annotations.EMPTY replaced with Annotations.Companion.getEMPTY() in java classes
This commit is contained in:
@@ -673,7 +673,7 @@ public abstract class KotlinBuiltIns {
|
||||
public JetType getArrayType(@NotNull Variance projectionType, @NotNull JetType argument) {
|
||||
List<TypeProjectionImpl> types = Collections.singletonList(new TypeProjectionImpl(projectionType, argument));
|
||||
return JetTypeImpl.create(
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
getArray(),
|
||||
false,
|
||||
types
|
||||
@@ -685,7 +685,7 @@ public abstract class KotlinBuiltIns {
|
||||
Variance projectionType = Variance.INVARIANT;
|
||||
List<TypeProjectionImpl> types = Collections.singletonList(new TypeProjectionImpl(projectionType, argument));
|
||||
return JetTypeImpl.create(
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
getEnum(),
|
||||
false,
|
||||
types
|
||||
@@ -857,7 +857,7 @@ public abstract class KotlinBuiltIns {
|
||||
for (int i = 0; i < parameterTypes.size(); i++) {
|
||||
TypeProjection parameterType = parameterTypes.get(i);
|
||||
ValueParameterDescriptorImpl valueParameterDescriptor = new ValueParameterDescriptorImpl(
|
||||
functionDescriptor, null, i, Annotations.EMPTY,
|
||||
functionDescriptor, null, i, Annotations.Companion.getEMPTY(),
|
||||
Name.identifier("p" + (i + 1)), parameterType.getType(), false, null, SourceElement.NO_SOURCE
|
||||
);
|
||||
valueParameters.add(valueParameterDescriptor);
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public abstract class AbstractLazyTypeParameterDescriptor extends AbstractTypePa
|
||||
int index,
|
||||
@NotNull SourceElement source
|
||||
) {
|
||||
super(storageManager, containingDeclaration, Annotations.EMPTY /* TODO */, name, variance, isReified, index, source);
|
||||
super(storageManager, containingDeclaration, Annotations.Companion.getEMPTY() /* TODO */, name, variance, isReified, index, source);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public abstract class AbstractReceiverParameterDescriptor extends DeclarationDes
|
||||
private static final Name RECEIVER_PARAMETER_NAME = Name.special("<this>");
|
||||
|
||||
public AbstractReceiverParameterDescriptor() {
|
||||
super(Annotations.EMPTY, RECEIVER_PARAMETER_NAME);
|
||||
super(Annotations.Companion.getEMPTY(), RECEIVER_PARAMETER_NAME);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public abstract class AbstractTypeParameterDescriptor extends DeclarationDescrip
|
||||
this.defaultType = storageManager.createLazyValue(new Function0<JetType>() {
|
||||
@Override
|
||||
public JetType invoke() {
|
||||
return JetTypeImpl.create(Annotations.EMPTY, getTypeConstructor(), false, Collections.<TypeProjection>emptyList(),
|
||||
return JetTypeImpl.create(Annotations.Companion.getEMPTY(), getTypeConstructor(), false, Collections.<TypeProjection>emptyList(),
|
||||
new LazyScopeAdapter(storageManager.createLazyValue(
|
||||
new Function0<JetScope>() {
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ClassDescriptorImpl extends ClassDescriptorBase {
|
||||
super(LockBasedStorageManager.NO_LOCKS, containingDeclaration, name, source);
|
||||
this.modality = modality;
|
||||
|
||||
this.typeConstructor = TypeConstructorImpl.createForClass(this, Annotations.EMPTY, false, getName().asString(),
|
||||
this.typeConstructor = TypeConstructorImpl.createForClass(this, Annotations.Companion.getEMPTY(), false, getName().asString(),
|
||||
Collections.<TypeParameterDescriptor>emptyList(), supertypes);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ClassDescriptorImpl extends ClassDescriptorBase {
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
// TODO
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class PropertySetterDescriptorImpl extends PropertyAccessorDescriptorImpl
|
||||
@NotNull JetType type
|
||||
) {
|
||||
return new ValueParameterDescriptorImpl(
|
||||
setterDescriptor, null, 0, Annotations.EMPTY, Name.special("<set-?>"), type, false, null, SourceElement.NO_SOURCE
|
||||
setterDescriptor, null, 0, Annotations.Companion.getEMPTY(), Name.special("<set-?>"), type, false, null, SourceElement.NO_SOURCE
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
public class ScriptCodeDescriptor extends FunctionDescriptorImpl {
|
||||
|
||||
public ScriptCodeDescriptor(@NotNull ScriptDescriptor containingDeclaration) {
|
||||
super(containingDeclaration, null, Annotations.EMPTY, Name.special("<script-code>"), Kind.DECLARATION, SourceElement.NO_SOURCE);
|
||||
super(containingDeclaration, null, Annotations.Companion.getEMPTY(), Name.special("<script-code>"), Kind.DECLARATION, SourceElement.NO_SOURCE);
|
||||
}
|
||||
|
||||
public void initialize(
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilPackage.
|
||||
public class DescriptorFactory {
|
||||
private static class DefaultConstructorDescriptor extends ConstructorDescriptorImpl {
|
||||
public DefaultConstructorDescriptor(@NotNull ClassDescriptor containingClass, @NotNull SourceElement source) {
|
||||
super(containingClass, null, Annotations.EMPTY, true, Kind.DECLARATION, source);
|
||||
super(containingClass, null, Annotations.Companion.getEMPTY(), true, Kind.DECLARATION, source);
|
||||
initialize(Collections.<TypeParameterDescriptor>emptyList(), Collections.<ValueParameterDescriptor>emptyList(),
|
||||
getDefaultConstructorVisibility(containingClass));
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class DescriptorFactory {
|
||||
@NotNull
|
||||
public static SimpleFunctionDescriptor createEnumValuesMethod(@NotNull ClassDescriptor enumClass) {
|
||||
SimpleFunctionDescriptorImpl values =
|
||||
SimpleFunctionDescriptorImpl.create(enumClass, Annotations.EMPTY, DescriptorUtils.ENUM_VALUES,
|
||||
SimpleFunctionDescriptorImpl.create(enumClass, Annotations.Companion.getEMPTY(), DescriptorUtils.ENUM_VALUES,
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED, enumClass.getSource());
|
||||
return values.initialize(null, null, Collections.<TypeParameterDescriptor>emptyList(),
|
||||
Collections.<ValueParameterDescriptor>emptyList(),
|
||||
@@ -109,10 +109,10 @@ public class DescriptorFactory {
|
||||
@NotNull
|
||||
public static SimpleFunctionDescriptor createEnumValueOfMethod(@NotNull ClassDescriptor enumClass) {
|
||||
SimpleFunctionDescriptorImpl valueOf =
|
||||
SimpleFunctionDescriptorImpl.create(enumClass, Annotations.EMPTY, DescriptorUtils.ENUM_VALUE_OF,
|
||||
SimpleFunctionDescriptorImpl.create(enumClass, Annotations.Companion.getEMPTY(), DescriptorUtils.ENUM_VALUE_OF,
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED, enumClass.getSource());
|
||||
ValueParameterDescriptor parameterDescriptor = new ValueParameterDescriptorImpl(
|
||||
valueOf, null, 0, Annotations.EMPTY, Name.identifier("value"), getBuiltIns(enumClass).getStringType(), false, null,
|
||||
valueOf, null, 0, Annotations.Companion.getEMPTY(), Name.identifier("value"), getBuiltIns(enumClass).getStringType(), false, null,
|
||||
enumClass.getSource()
|
||||
);
|
||||
return valueOf.initialize(null, null, Collections.<TypeParameterDescriptor>emptyList(),
|
||||
|
||||
@@ -240,7 +240,7 @@ public class CommonSupertypes {
|
||||
else {
|
||||
newScope = ErrorUtils.createErrorScope("A scope for common supertype which is not a normal classifier", true);
|
||||
}
|
||||
return JetTypeImpl.create(Annotations.EMPTY, constructor, nullable, newProjections, newScope);
|
||||
return JetTypeImpl.create(Annotations.Companion.getEMPTY(), constructor, nullable, newProjections, newScope);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ErrorUtils {
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -404,7 +404,7 @@ public class ErrorUtils {
|
||||
super(getErrorModule(), Name.special(name == null ? "<ERROR CLASS>" : "<ERROR CLASS: " + name + ">"),
|
||||
Modality.OPEN, Collections.<JetType>emptyList(), SourceElement.NO_SOURCE);
|
||||
|
||||
ConstructorDescriptorImpl errorConstructor = ConstructorDescriptorImpl.create(this, Annotations.EMPTY, true, SourceElement.NO_SOURCE);
|
||||
ConstructorDescriptorImpl errorConstructor = ConstructorDescriptorImpl.create(this, Annotations.Companion.getEMPTY(), true, SourceElement.NO_SOURCE);
|
||||
errorConstructor.initialize(Collections.<TypeParameterDescriptor>emptyList(), Collections.<ValueParameterDescriptor>emptyList(),
|
||||
Visibilities.INTERNAL);
|
||||
JetScope memberScope = createErrorScope(getName().asString());
|
||||
@@ -470,7 +470,7 @@ public class ErrorUtils {
|
||||
private static PropertyDescriptorImpl createErrorProperty() {
|
||||
PropertyDescriptorImpl descriptor = PropertyDescriptorImpl.create(
|
||||
ERROR_CLASS,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
Modality.OPEN,
|
||||
Visibilities.INTERNAL,
|
||||
true,
|
||||
@@ -576,7 +576,7 @@ public class ErrorUtils {
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -607,7 +607,7 @@ public class ErrorUtils {
|
||||
public static TypeParameterDescriptor createErrorTypeParameter(int index, @NotNull String debugMessage) {
|
||||
return TypeParameterDescriptorImpl.createWithDefaultBound(
|
||||
ERROR_CLASS,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
false,
|
||||
Variance.INVARIANT,
|
||||
Name.special("<ERROR: " + debugMessage + ">"),
|
||||
@@ -671,7 +671,7 @@ public class ErrorUtils {
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -125,7 +125,7 @@ public class TypeIntersector {
|
||||
return TypeUtils.makeNullableAsSpecified(resultingTypes.get(0), allNullable);
|
||||
}
|
||||
|
||||
TypeConstructor constructor = new IntersectionTypeConstructor(Annotations.EMPTY, resultingTypes);
|
||||
TypeConstructor constructor = new IntersectionTypeConstructor(Annotations.Companion.getEMPTY(), resultingTypes);
|
||||
|
||||
JetScope[] scopes = new JetScope[resultingTypes.size()];
|
||||
int i = 0;
|
||||
@@ -135,7 +135,7 @@ public class TypeIntersector {
|
||||
}
|
||||
|
||||
return JetTypeImpl.create(
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
constructor,
|
||||
allNullable,
|
||||
Collections.<TypeProjection>emptyList(),
|
||||
|
||||
@@ -243,7 +243,7 @@ public class TypeUtils {
|
||||
TypeConstructor typeConstructor = classDescriptor.getTypeConstructor();
|
||||
List<TypeProjection> arguments = getDefaultTypeProjections(typeConstructor.getParameters());
|
||||
return JetTypeImpl.create(
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
typeConstructor,
|
||||
false,
|
||||
arguments,
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class ErrorSimpleFunctionDescriptorImpl extends SimpleFunctionDescriptorI
|
||||
private final ErrorUtils.ErrorScope ownerScope;
|
||||
|
||||
public ErrorSimpleFunctionDescriptorImpl(@NotNull ClassDescriptor containingDeclaration, @NotNull ErrorUtils.ErrorScope ownerScope) {
|
||||
super(containingDeclaration, null, Annotations.EMPTY, Name.special("<ERROR FUNCTION>"), Kind.DECLARATION, SourceElement.NO_SOURCE);
|
||||
super(containingDeclaration, null, Annotations.Companion.getEMPTY(), Name.special("<ERROR FUNCTION>"), Kind.DECLARATION, SourceElement.NO_SOURCE);
|
||||
this.ownerScope = ownerScope;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class DeserializedTypeParameterDescriptor extends AbstractLazyTypeParamet
|
||||
}
|
||||
Set<JetType> result = new LinkedHashSet<JetType>(proto.getUpperBoundCount());
|
||||
for (ProtoBuf.Type upperBound : proto.getUpperBoundList()) {
|
||||
result.add(typeDeserializer.type(upperBound, Annotations.EMPTY));
|
||||
result.add(typeDeserializer.type(upperBound, Annotations.Companion.getEMPTY()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user