Annotations.EMPTY replaced with Annotations.Companion.getEMPTY() in java classes
This commit is contained in:
+3
-3
@@ -55,7 +55,7 @@ public class AccessorForPropertyDescriptor extends PropertyDescriptorImpl implem
|
||||
int index,
|
||||
@Nullable JetSuperExpression superCallExpression
|
||||
) {
|
||||
super(containingDeclaration, null, Annotations.EMPTY, Modality.FINAL, Visibilities.LOCAL,
|
||||
super(containingDeclaration, null, Annotations.Companion.getEMPTY(), Modality.FINAL, Visibilities.LOCAL,
|
||||
original.isVar(), Name.identifier("access$" + getIndexedAccessorSuffix(original, index)),
|
||||
Kind.DECLARATION, SourceElement.NO_SOURCE, /* lateInit = */ false, /* isConst = */ false);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class AccessorForPropertyDescriptor extends PropertyDescriptorImpl implem
|
||||
|
||||
public static class Getter extends PropertyGetterDescriptorImpl implements AccessorForCallableDescriptor<PropertyGetterDescriptor> {
|
||||
public Getter(AccessorForPropertyDescriptor property) {
|
||||
super(property, Annotations.EMPTY, Modality.FINAL, Visibilities.LOCAL,
|
||||
super(property, Annotations.Companion.getEMPTY(), Modality.FINAL, Visibilities.LOCAL,
|
||||
false, false, Kind.DECLARATION, null, SourceElement.NO_SOURCE);
|
||||
initialize(property.getType());
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class AccessorForPropertyDescriptor extends PropertyDescriptorImpl implem
|
||||
|
||||
public static class Setter extends PropertySetterDescriptorImpl implements AccessorForCallableDescriptor<PropertySetterDescriptor>{
|
||||
public Setter(AccessorForPropertyDescriptor property) {
|
||||
super(property, Annotations.EMPTY, Modality.FINAL, Visibilities.LOCAL,
|
||||
super(property, Annotations.Companion.getEMPTY(), Modality.FINAL, Visibilities.LOCAL,
|
||||
false, false, Kind.DECLARATION, null, SourceElement.NO_SOURCE);
|
||||
initializeDefault();
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class JvmRuntimeTypes {
|
||||
|
||||
//noinspection ConstantConditions
|
||||
JetType functionType = getBuiltIns(descriptor).getFunctionType(
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
receiverParameter == null ? null : receiverParameter.getType(),
|
||||
ExpressionTypingUtils.getValueParametersTypes(descriptor.getValueParameters()),
|
||||
descriptor.getReturnType()
|
||||
@@ -97,7 +97,7 @@ public class JvmRuntimeTypes {
|
||||
|
||||
//noinspection ConstantConditions
|
||||
JetType functionType = getBuiltIns(descriptor).getFunctionType(
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
receiverType,
|
||||
ExpressionTypingUtils.getValueParametersTypes(descriptor.getValueParameters()),
|
||||
descriptor.getReturnType()
|
||||
|
||||
@@ -327,7 +327,7 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
|
||||
if (clInit == null) {
|
||||
MethodVisitor mv = v.newMethod(OtherOrigin(descriptor), ACC_STATIC, "<clinit>", "()V", null, null);
|
||||
SimpleFunctionDescriptorImpl clInit =
|
||||
SimpleFunctionDescriptorImpl.create(descriptor, Annotations.EMPTY, Name.special("<clinit>"), SYNTHESIZED,
|
||||
SimpleFunctionDescriptorImpl.create(descriptor, Annotations.Companion.getEMPTY(), Name.special("<clinit>"), SYNTHESIZED,
|
||||
SourcePackage.toSourceElement(element));
|
||||
clInit.initialize(null, null, Collections.<TypeParameterDescriptor>emptyList(),
|
||||
Collections.<ValueParameterDescriptor>emptyList(),
|
||||
|
||||
@@ -66,7 +66,7 @@ public class MutableClassDescriptor extends ClassDescriptorBase implements Class
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
public void setModality(@NotNull Modality modality) {
|
||||
@@ -142,7 +142,7 @@ public class MutableClassDescriptor extends ClassDescriptorBase implements Class
|
||||
assert typeConstructor == null : typeConstructor;
|
||||
this.typeConstructor = TypeConstructorImpl.createForClass(
|
||||
this,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
!getModality().isOverridable(),
|
||||
getName().asString(),
|
||||
typeParameters,
|
||||
|
||||
@@ -395,7 +395,7 @@ public class PropertyCodegen {
|
||||
private void generateGetter(@Nullable JetNamedDeclaration p, @NotNull PropertyDescriptor descriptor, @Nullable JetPropertyAccessor getter) {
|
||||
generateAccessor(p, getter, descriptor.getGetter() != null
|
||||
? descriptor.getGetter()
|
||||
: DescriptorFactory.createDefaultGetter(descriptor, Annotations.EMPTY));
|
||||
: DescriptorFactory.createDefaultGetter(descriptor, Annotations.Companion.getEMPTY()));
|
||||
}
|
||||
|
||||
private void generateSetter(@Nullable JetNamedDeclaration p, @NotNull PropertyDescriptor descriptor, @Nullable JetPropertyAccessor setter) {
|
||||
@@ -403,7 +403,7 @@ public class PropertyCodegen {
|
||||
|
||||
generateAccessor(p, setter, descriptor.getSetter() != null
|
||||
? descriptor.getSetter()
|
||||
: DescriptorFactory.createDefaultSetter(descriptor, Annotations.EMPTY));
|
||||
: DescriptorFactory.createDefaultSetter(descriptor, Annotations.Companion.getEMPTY()));
|
||||
}
|
||||
|
||||
private void generateAccessor(
|
||||
|
||||
+2
-2
@@ -122,7 +122,7 @@ public class SingleAbstractMethodUtils {
|
||||
for (ValueParameterDescriptor parameter : valueParameters) {
|
||||
parameterTypes.add(parameter.getType());
|
||||
}
|
||||
return getBuiltIns(function).getFunctionType(Annotations.EMPTY, null, parameterTypes, returnType);
|
||||
return getBuiltIns(function).getFunctionType(Annotations.Companion.getEMPTY(), null, parameterTypes, returnType);
|
||||
}
|
||||
|
||||
private static boolean isSamInterface(@NotNull ClassDescriptor klass) {
|
||||
@@ -157,7 +157,7 @@ public class SingleAbstractMethodUtils {
|
||||
assert parameterType != null : "couldn't substitute type: " + parameterTypeUnsubstituted +
|
||||
", substitutor = " + typeParameters.substitutor;
|
||||
ValueParameterDescriptor parameter = new ValueParameterDescriptorImpl(
|
||||
result, null, 0, Annotations.EMPTY, Name.identifier("function"), parameterType, false, null, SourceElement.NO_SOURCE);
|
||||
result, null, 0, Annotations.Companion.getEMPTY(), Name.identifier("function"), parameterType, false, null, SourceElement.NO_SOURCE);
|
||||
|
||||
JetType returnType = typeParameters.substitutor.substitute(samInterface.getDefaultType(), Variance.OUT_VARIANCE);
|
||||
assert returnType != null : "couldn't substitute type: " + samInterface.getDefaultType() +
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ public class SignaturesPropagationData {
|
||||
) {
|
||||
JavaMethodDescriptor autoMethodDescriptor = JavaMethodDescriptor.createJavaMethod(
|
||||
containingClass,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
method.getName(),
|
||||
//TODO: what to do?
|
||||
SourceElement.NO_SOURCE
|
||||
|
||||
@@ -121,7 +121,7 @@ public class AnnotationResolver {
|
||||
boolean shouldResolveArguments
|
||||
) {
|
||||
if (modifierList == null) {
|
||||
return Annotations.EMPTY;
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
List<JetAnnotationEntry> annotationEntryElements = modifierList.getAnnotationEntries();
|
||||
@@ -157,7 +157,7 @@ public class AnnotationResolver {
|
||||
@NotNull BindingTrace trace,
|
||||
boolean shouldResolveArguments
|
||||
) {
|
||||
if (annotationEntryElements.isEmpty()) return Annotations.EMPTY;
|
||||
if (annotationEntryElements.isEmpty()) return Annotations.Companion.getEMPTY();
|
||||
List<AnnotationWithTarget> result = new ArrayList<AnnotationWithTarget>(0);
|
||||
|
||||
for (JetAnnotationEntry entryElement : annotationEntryElements) {
|
||||
|
||||
@@ -229,7 +229,7 @@ public class DescriptorResolver {
|
||||
|
||||
SimpleFunctionDescriptorImpl functionDescriptor = SimpleFunctionDescriptorImpl.create(
|
||||
classDescriptor,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
functionName,
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED,
|
||||
parameter.getSource()
|
||||
@@ -261,7 +261,7 @@ public class DescriptorResolver {
|
||||
|
||||
SimpleFunctionDescriptorImpl functionDescriptor = SimpleFunctionDescriptorImpl.create(
|
||||
classDescriptor,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
COPY_METHOD_NAME,
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED,
|
||||
classDescriptor.getSource()
|
||||
@@ -344,7 +344,7 @@ public class DescriptorResolver {
|
||||
|
||||
Annotations allAnnotations =
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, valueParameter.getModifierList(), trace);
|
||||
Annotations valueParameterAnnotations = Annotations.EMPTY;
|
||||
Annotations valueParameterAnnotations = Annotations.Companion.getEMPTY();
|
||||
|
||||
if (modifierList != null) {
|
||||
if (valueParameter.hasValOrVar()) {
|
||||
@@ -413,7 +413,7 @@ public class DescriptorResolver {
|
||||
|
||||
TypeParameterDescriptorImpl typeParameterDescriptor = TypeParameterDescriptorImpl.createForFurtherModification(
|
||||
containingDescriptor,
|
||||
Annotations.EMPTY,
|
||||
Annotations.Companion.getEMPTY(),
|
||||
typeParameter.hasModifier(JetTokens.REIFIED_KEYWORD),
|
||||
typeParameter.getVariance(),
|
||||
JetPsiUtil.safeName(typeParameter.getName()),
|
||||
@@ -676,13 +676,13 @@ public class DescriptorResolver {
|
||||
private static void initializeWithDefaultGetterSetter(PropertyDescriptorImpl propertyDescriptor) {
|
||||
PropertyGetterDescriptorImpl getter = propertyDescriptor.getGetter();
|
||||
if (getter == null && !Visibilities.isPrivate(propertyDescriptor.getVisibility())) {
|
||||
getter = DescriptorFactory.createDefaultGetter(propertyDescriptor, Annotations.EMPTY);
|
||||
getter = DescriptorFactory.createDefaultGetter(propertyDescriptor, Annotations.Companion.getEMPTY());
|
||||
getter.initialize(propertyDescriptor.getType());
|
||||
}
|
||||
|
||||
PropertySetterDescriptor setter = propertyDescriptor.getSetter();
|
||||
if (setter == null && propertyDescriptor.isVar()) {
|
||||
setter = DescriptorFactory.createDefaultSetter(propertyDescriptor, Annotations.EMPTY);
|
||||
setter = DescriptorFactory.createDefaultSetter(propertyDescriptor, Annotations.Companion.getEMPTY());
|
||||
}
|
||||
propertyDescriptor.initialize(getter, setter);
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ public class ArgumentTypeResolver {
|
||||
return expectedTypeIsUnknown
|
||||
? functionPlaceholders
|
||||
.createFunctionPlaceholderType(Collections.<JetType>emptyList(), /* hasDeclaredArguments = */ false)
|
||||
: builtIns.getFunctionType(Annotations.EMPTY, null, Collections.<JetType>emptyList(), DONT_CARE);
|
||||
: builtIns.getFunctionType(Annotations.Companion.getEMPTY(), null, Collections.<JetType>emptyList(), DONT_CARE);
|
||||
}
|
||||
List<JetParameter> valueParameters = function.getValueParameters();
|
||||
TemporaryBindingTrace temporaryTrace = TemporaryBindingTrace.create(
|
||||
@@ -295,7 +295,7 @@ public class ArgumentTypeResolver {
|
||||
|
||||
return expectedTypeIsUnknown && isFunctionLiteral
|
||||
? functionPlaceholders.createFunctionPlaceholderType(parameterTypes, /* hasDeclaredArguments = */ true)
|
||||
: builtIns.getFunctionType(Annotations.EMPTY, receiverType, parameterTypes, returnType);
|
||||
: builtIns.getFunctionType(Annotations.Companion.getEMPTY(), receiverType, parameterTypes, returnType);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -318,7 +318,7 @@ public class CallResolver {
|
||||
for (int i = 0; i < parameterNumber; i++) {
|
||||
parameterTypes.add(NO_EXPECTED_TYPE);
|
||||
}
|
||||
expectedType = builtIns.getFunctionType(Annotations.EMPTY, null, parameterTypes, context.expectedType);
|
||||
expectedType = builtIns.getFunctionType(Annotations.Companion.getEMPTY(), null, parameterTypes, context.expectedType);
|
||||
}
|
||||
JetType calleeType = expressionTypingServices.safeGetType(
|
||||
context.scope, calleeExpression, expectedType, context.dataFlowInfo, context.trace);
|
||||
|
||||
+3
-3
@@ -180,12 +180,12 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
);
|
||||
}
|
||||
else {
|
||||
this.annotations = Annotations.EMPTY;
|
||||
this.annotations = Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
List<JetAnnotationEntry> jetDanglingAnnotations = classLikeInfo.getDanglingAnnotations();
|
||||
if (jetDanglingAnnotations.isEmpty()) {
|
||||
this.danglingAnnotations = Annotations.EMPTY;
|
||||
this.danglingAnnotations = Annotations.Companion.getEMPTY();
|
||||
}
|
||||
else {
|
||||
this.danglingAnnotations = new LazyAnnotations(
|
||||
@@ -672,7 +672,7 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
@NotNull
|
||||
@Override
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.EMPTY; // TODO
|
||||
return Annotations.Companion.getEMPTY(); // TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -519,7 +519,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
JetType type = resolveClassLiteral(expression, c);
|
||||
if (type != null && !type.isError()) {
|
||||
return components.dataFlowAnalyzer.createCheckedTypeInfo(
|
||||
components.reflectionTypes.getKClassType(Annotations.EMPTY, type), c, expression
|
||||
components.reflectionTypes.getKClassType(Annotations.Companion.getEMPTY(), type), c, expression
|
||||
);
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
}
|
||||
});
|
||||
|
||||
return JetTypeImpl.create(Annotations.EMPTY, descriptor, false, arguments);
|
||||
return JetTypeImpl.create(Annotations.Companion.getEMPTY(), descriptor, false, arguments);
|
||||
}
|
||||
|
||||
private static boolean isAllowedInClassLiteral(@NotNull JetType type) {
|
||||
|
||||
+3
-3
@@ -103,11 +103,11 @@ public class ControlStructureTypingUtils {
|
||||
Name specialFunctionName = Name.identifierNoValidate("<SPECIAL-FUNCTION-FOR-" + constructionName + "-RESOLVE>");
|
||||
|
||||
SimpleFunctionDescriptorImpl function = SimpleFunctionDescriptorImpl.create(
|
||||
moduleDescriptor, Annotations.EMPTY, specialFunctionName, CallableMemberDescriptor.Kind.DECLARATION, SourceElement.NO_SOURCE
|
||||
moduleDescriptor, Annotations.Companion.getEMPTY(), specialFunctionName, CallableMemberDescriptor.Kind.DECLARATION, SourceElement.NO_SOURCE
|
||||
);
|
||||
|
||||
TypeParameterDescriptor typeParameter = TypeParameterDescriptorImpl.createWithDefaultBound(
|
||||
function, Annotations.EMPTY, false, Variance.INVARIANT,
|
||||
function, Annotations.Companion.getEMPTY(), false, Variance.INVARIANT,
|
||||
Name.identifierNoValidate("<TYPE-PARAMETER-FOR-" + constructionName + "-RESOLVE>"), 0);
|
||||
|
||||
JetType type = typeParameter.getDefaultType();
|
||||
@@ -117,7 +117,7 @@ public class ControlStructureTypingUtils {
|
||||
for (int i = 0; i < argumentNames.size(); i++) {
|
||||
JetType argumentType = isArgumentNullable.get(i) ? nullableType : type;
|
||||
ValueParameterDescriptorImpl valueParameter = new ValueParameterDescriptorImpl(
|
||||
function, null, i, Annotations.EMPTY, Name.identifier(argumentNames.get(i)),
|
||||
function, null, i, Annotations.Companion.getEMPTY(), Name.identifier(argumentNames.get(i)),
|
||||
argumentType, false, null, SourceElement.NO_SOURCE
|
||||
);
|
||||
valueParameters.add(valueParameter);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TypeUnifierTest extends JetLiteFixture {
|
||||
|
||||
private TypeParameterDescriptor createTypeVariable(String name) {
|
||||
return TypeParameterDescriptorImpl.createWithDefaultBound(
|
||||
builtIns.getBuiltInsModule(), Annotations.EMPTY, false, Variance.INVARIANT,
|
||||
builtIns.getBuiltInsModule(), Annotations.Companion.getEMPTY(), false, Variance.INVARIANT,
|
||||
Name.identifier(name), 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public class ManglingUtils {
|
||||
|
||||
if (!hasPrimaryConstructor(classDescriptor)) {
|
||||
ConstructorDescriptorImpl fakePrimaryConstructor =
|
||||
ConstructorDescriptorImpl.create(classDescriptor, Annotations.EMPTY, true, SourceElement.NO_SOURCE);
|
||||
ConstructorDescriptorImpl.create(classDescriptor, Annotations.Companion.getEMPTY(), true, SourceElement.NO_SOURCE);
|
||||
return CollectionsKt.plus(constructors, fakePrimaryConstructor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user