From 0e63fa3761927ba1c412a2bc37c7d10690331a34 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 4 May 2011 15:40:30 +0400 Subject: [PATCH] Renamed Attribute into Annotation --- ...eResolver.java => AnnotationResolver.java} | 14 +++---- .../lang/resolve/ClassDescriptorResolver.java | 28 ++++++------- .../LazySubstitutingClassDescriptor.java | 2 +- .../resolve/MutableDeclarationDescriptor.java | 4 +- .../jet/lang/resolve/TopDownAnalyzer.java | 2 +- .../jet/lang/resolve/TypeResolver.java | 16 +++---- .../resolve/java/JavaClassMembersScope.java | 2 +- .../resolve/java/JavaDescriptorResolver.java | 16 +++---- .../resolve/java/JavaTypeTransformer.java | 4 +- .../jetbrains/jet/lang/types/Annotated.java | 2 +- .../jet/lang/types/AnnotatedImpl.java | 10 ++--- .../types/{Attribute.java => Annotation.java} | 2 +- .../jet/lang/types/ClassDescriptorImpl.java | 6 +-- .../lang/types/ConstructorDescriptorImpl.java | 10 ++--- .../lang/types/DeclarationDescriptorImpl.java | 4 +- .../jetbrains/jet/lang/types/ErrorUtils.java | 16 +++---- .../lang/types/FunctionDescriptorImpl.java | 10 ++--- .../lang/types/FunctionDescriptorUtil.java | 2 +- .../jet/lang/types/JetStandardClasses.java | 42 +++++++++---------- .../jet/lang/types/JetStandardLibrary.java | 4 +- .../jet/lang/types/JetTypeChecker.java | 2 +- .../jetbrains/jet/lang/types/JetTypeImpl.java | 8 ++-- .../jet/lang/types/JetTypeInferrer.java | 4 +- .../lang/types/LocalVariableDescriptor.java | 4 +- .../jet/lang/types/ModuleDescriptor.java | 2 +- .../jet/lang/types/NamespaceDescriptor.java | 4 +- .../jet/lang/types/NamespaceType.java | 2 +- .../types/PropertyAccessorDescriptor.java | 4 +- .../jet/lang/types/PropertyDescriptor.java | 6 +-- .../lang/types/PropertyGetterDescriptor.java | 4 +- .../lang/types/PropertySetterDescriptor.java | 4 +- .../jet/lang/types/TypeConstructorImpl.java | 4 +- .../lang/types/TypeParameterDescriptor.java | 12 +++--- .../jet/lang/types/TypeSubstitutor.java | 2 +- .../jetbrains/jet/lang/types/TypeUtils.java | 10 ++--- .../types/ValueParameterDescriptorImpl.java | 8 ++-- .../lang/types/VariableDescriptorImpl.java | 4 +- 37 files changed, 140 insertions(+), 140 deletions(-) rename idea/src/org/jetbrains/jet/lang/resolve/{AttributeResolver.java => AnnotationResolver.java} (57%) rename idea/src/org/jetbrains/jet/lang/types/{Attribute.java => Annotation.java} (69%) diff --git a/idea/src/org/jetbrains/jet/lang/resolve/AttributeResolver.java b/idea/src/org/jetbrains/jet/lang/resolve/AnnotationResolver.java similarity index 57% rename from idea/src/org/jetbrains/jet/lang/resolve/AttributeResolver.java rename to idea/src/org/jetbrains/jet/lang/resolve/AnnotationResolver.java index 6fa81b4bdbd..17a00c05a6a 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/AttributeResolver.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/AnnotationResolver.java @@ -4,7 +4,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.JetAttribute; import org.jetbrains.jet.lang.psi.JetModifierList; -import org.jetbrains.jet.lang.types.Attribute; +import org.jetbrains.jet.lang.types.Annotation; import java.util.Collections; import java.util.List; @@ -12,13 +12,13 @@ import java.util.List; /** * @author abreslav */ -public class AttributeResolver { - public static final AttributeResolver INSTANCE = new AttributeResolver(); +public class AnnotationResolver { + public static final AnnotationResolver INSTANCE = new AnnotationResolver(); - private AttributeResolver() {} + private AnnotationResolver() {} @NotNull - public List resolveAttributes(@NotNull List attributeElements) { + public List resolveAnnotations(@NotNull List attributeElements) { return Collections.emptyList(); // TODO // if (attributeElements.isEmpty()) { // } @@ -26,10 +26,10 @@ public class AttributeResolver { } @NotNull - public List resolveAttributes(@Nullable JetModifierList modifierList) { + public List resolveAnnotations(@Nullable JetModifierList modifierList) { if (modifierList == null) { return Collections.emptyList(); } - return resolveAttributes(modifierList.getAttributes()); + return resolveAnnotations(modifierList.getAttributes()); } } diff --git a/idea/src/org/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java b/idea/src/org/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java index 7fc611e93fa..5fc6b111cdf 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/ClassDescriptorResolver.java @@ -35,7 +35,7 @@ public class ClassDescriptorResolver { public ClassDescriptor resolveClassDescriptor(@NotNull JetScope scope, @NotNull JetClass classElement) { ClassDescriptorImpl classDescriptor = new ClassDescriptorImpl( scope.getContainingDeclaration(), - AttributeResolver.INSTANCE.resolveAttributes(classElement.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(classElement.getModifierList()), JetPsiUtil.safeName(classElement.getName())); trace.recordDeclarationResolution(classElement, classDescriptor); @@ -86,7 +86,7 @@ public class ClassDescriptorResolver { List supertypes = new ArrayList(); TypeConstructorImpl typeConstructor = new TypeConstructorImpl( descriptor, - AttributeResolver.INSTANCE.resolveAttributes(classElement.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(classElement.getModifierList()), !open, JetPsiUtil.safeName(classElement.getName()), typeParameters, @@ -163,7 +163,7 @@ public class ClassDescriptorResolver { public FunctionDescriptorImpl resolveFunctionDescriptor(DeclarationDescriptor containingDescriptor, JetScope scope, JetFunction function) { FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl( containingDescriptor, - AttributeResolver.INSTANCE.resolveAttributes(function.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(function.getModifierList()), JetPsiUtil.safeName(function.getName()) ); WritableScope innerScope = semanticServices.createWritableScope(scope, functionDescriptor); @@ -220,7 +220,7 @@ public class ClassDescriptorResolver { MutableValueParameterDescriptor valueParameterDescriptor = new ValueParameterDescriptorImpl( declarationDescriptor, index, - AttributeResolver.INSTANCE.resolveAttributes(valueParameter.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(valueParameter.getModifierList()), JetPsiUtil.safeName(valueParameter.getName()), valueParameter.isMutable() ? type : null, type, @@ -250,7 +250,7 @@ public class ClassDescriptorResolver { : typeResolver.resolveType(extensibleScope, extendsBound); TypeParameterDescriptor typeParameterDescriptor = new TypeParameterDescriptor( containingDescriptor, - AttributeResolver.INSTANCE.resolveAttributes(typeParameter.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(typeParameter.getModifierList()), typeParameter.getVariance(), JetPsiUtil.safeName(typeParameter.getName()), Collections.singleton(bound), @@ -300,7 +300,7 @@ public class ClassDescriptorResolver { public VariableDescriptor resolveLocalVariableDescriptor(@NotNull DeclarationDescriptor containingDeclaration, @NotNull JetParameter parameter, @NotNull JetType type) { VariableDescriptor variableDescriptor = new LocalVariableDescriptor( containingDeclaration, - AttributeResolver.INSTANCE.resolveAttributes(parameter.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(parameter.getModifierList()), JetPsiUtil.safeName(parameter.getName()), type, parameter.isMutable()); @@ -314,7 +314,7 @@ public class ClassDescriptorResolver { VariableDescriptorImpl variableDescriptor = new LocalVariableDescriptor( containingDeclaration, - AttributeResolver.INSTANCE.resolveAttributes(property.getModifierList()), + AnnotationResolver.INSTANCE.resolveAnnotations(property.getModifierList()), JetPsiUtil.safeName(property.getName()), type, property.isVar()); @@ -330,7 +330,7 @@ public class ClassDescriptorResolver { JetModifierList modifierList = property.getModifierList(); PropertyDescriptor propertyDescriptor = new PropertyDescriptor( containingDeclaration, - AttributeResolver.INSTANCE.resolveAttributes(modifierList), + AnnotationResolver.INSTANCE.resolveAnnotations(modifierList), resolveModifiers(modifierList, DEFAULT_MODIFIERS), // TODO : default modifiers differ in different contexts isVar, JetPsiUtil.safeName(property.getName()), @@ -364,10 +364,10 @@ public class ClassDescriptorResolver { } PropertySetterDescriptor setterDescriptor = null; if (setter != null) { - List attributes = AttributeResolver.INSTANCE.resolveAttributes(setter.getModifierList()); + List annotations = AnnotationResolver.INSTANCE.resolveAnnotations(setter.getModifierList()); JetParameter parameter = setter.getParameter(); - setterDescriptor = new PropertySetterDescriptor(propertyDescriptor, attributes, setter.getBodyExpression() != null); + setterDescriptor = new PropertySetterDescriptor(propertyDescriptor, annotations, setter.getBodyExpression() != null); if (parameter != null) { if (parameter.isRef()) { semanticServices.getErrorHandler().genericError(parameter.getRefNode(), "Setter parameters can not be 'ref'"); @@ -410,7 +410,7 @@ public class ClassDescriptorResolver { PropertyGetterDescriptor getterDescriptor = null; JetPropertyAccessor getter = property.getGetter(); if (getter != null) { - List attributes = AttributeResolver.INSTANCE.resolveAttributes(getter.getModifierList()); + List annotations = AnnotationResolver.INSTANCE.resolveAnnotations(getter.getModifierList()); JetType returnType = null; JetTypeReference returnTypeReference = getter.getReturnTypeReference(); @@ -418,7 +418,7 @@ public class ClassDescriptorResolver { returnType = typeResolver.resolveType(scope, returnTypeReference); } - getterDescriptor = new PropertyGetterDescriptor(propertyDescriptor, attributes, returnType, getter.getBodyExpression() != null); + getterDescriptor = new PropertyGetterDescriptor(propertyDescriptor, annotations, returnType, getter.getBodyExpression() != null); trace.recordDeclarationResolution(getter, getterDescriptor); } return getterDescriptor; @@ -460,7 +460,7 @@ public class ClassDescriptorResolver { @NotNull List valueParameters) { ConstructorDescriptorImpl constructorDescriptor = new ConstructorDescriptorImpl( classDescriptor, - AttributeResolver.INSTANCE.resolveAttributes(modifierList), + AnnotationResolver.INSTANCE.resolveAnnotations(modifierList), isPrimary ); trace.recordDeclarationResolution(declarationToTrace, constructorDescriptor); @@ -502,7 +502,7 @@ public class ClassDescriptorResolver { PropertyDescriptor propertyDescriptor = new PropertyDescriptor( classDescriptor, - AttributeResolver.INSTANCE.resolveAttributes(modifierList), + AnnotationResolver.INSTANCE.resolveAnnotations(modifierList), resolveModifiers(modifierList, DEFAULT_MODIFIERS), isMutable, name == null ? "" : name, diff --git a/idea/src/org/jetbrains/jet/lang/resolve/LazySubstitutingClassDescriptor.java b/idea/src/org/jetbrains/jet/lang/resolve/LazySubstitutingClassDescriptor.java index 3db02359589..1aede77aa2c 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/LazySubstitutingClassDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/LazySubstitutingClassDescriptor.java @@ -60,7 +60,7 @@ public class LazySubstitutingClassDescriptor implements ClassDescriptor { } @Override - public List getAttributes() { + public List getAnnotations() { throw new UnsupportedOperationException(); // TODO } diff --git a/idea/src/org/jetbrains/jet/lang/resolve/MutableDeclarationDescriptor.java b/idea/src/org/jetbrains/jet/lang/resolve/MutableDeclarationDescriptor.java index 6c0440ebf10..6cc5f93f698 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/MutableDeclarationDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/MutableDeclarationDescriptor.java @@ -1,7 +1,7 @@ package org.jetbrains.jet.lang.resolve; import org.jetbrains.annotations.NotNull; -import org.jetbrains.jet.lang.types.Attribute; +import org.jetbrains.jet.lang.types.Annotation; import org.jetbrains.jet.lang.types.DeclarationDescriptor; import org.jetbrains.jet.lang.types.DeclarationDescriptorVisitor; @@ -19,7 +19,7 @@ public abstract class MutableDeclarationDescriptor implements DeclarationDescrip } @Override - public List getAttributes() { + public List getAnnotations() { throw new UnsupportedOperationException(); // TODO } diff --git a/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java b/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java index 2e4fb5cf33f..b6340625519 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/TopDownAnalyzer.java @@ -119,7 +119,7 @@ public class TopDownAnalyzer { if (namespaceDescriptor == null) { namespaceDescriptor = new NamespaceDescriptor( declaringScope.getContainingDeclaration(), - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO name ); namespaceDescriptor.initialize(semanticServices.createWritableScope(JetScope.EMPTY, namespaceDescriptor)); diff --git a/idea/src/org/jetbrains/jet/lang/resolve/TypeResolver.java b/idea/src/org/jetbrains/jet/lang/resolve/TypeResolver.java index dd626dd2c2f..035657e94ee 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/TypeResolver.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/TypeResolver.java @@ -25,16 +25,16 @@ public class TypeResolver { @NotNull public JetType resolveType(@NotNull final JetScope scope, @NotNull final JetTypeReference typeReference) { - final List attributes = AttributeResolver.INSTANCE.resolveAttributes(typeReference.getAttributes()); + final List annotations = AnnotationResolver.INSTANCE.resolveAnnotations(typeReference.getAttributes()); JetTypeElement typeElement = typeReference.getTypeElement(); - JetType type = resolveTypeElement(scope, attributes, typeElement, false); + JetType type = resolveTypeElement(scope, annotations, typeElement, false); trace.recordTypeResolution(typeReference, type); return type; } @NotNull - private JetType resolveTypeElement(final JetScope scope, final List attributes, JetTypeElement typeElement, final boolean nullable) { + private JetType resolveTypeElement(final JetScope scope, final List annotations, JetTypeElement typeElement, final boolean nullable) { final JetType[] result = new JetType[1]; if (typeElement != null) { typeElement.accept(new JetVisitor() { @@ -54,7 +54,7 @@ public class TypeResolver { trace.recordReferenceResolution(referenceExpression, typeParameterDescriptor); result[0] = new JetTypeImpl( - attributes, + annotations, typeParameterDescriptor.getTypeConstructor(), nullable || TypeUtils.hasNullableBound(typeParameterDescriptor), Collections.emptyList(), @@ -72,7 +72,7 @@ public class TypeResolver { int actualArgumentCount = arguments.size(); if (ErrorUtils.isError(typeConstructor)) { result[0] = new JetTypeImpl( - attributes, + annotations, typeConstructor, nullable, arguments, // TODO : review @@ -89,7 +89,7 @@ public class TypeResolver { } } else { result[0] = new JetTypeImpl( - attributes, + annotations, typeConstructor, nullable, arguments, @@ -103,7 +103,7 @@ public class TypeResolver { @Override public void visitNullableType(JetNullableType nullableType) { - result[0] = resolveTypeElement(scope, attributes, nullableType.getInnerType(), true); + result[0] = resolveTypeElement(scope, annotations, nullableType.getInnerType(), true); } @Override @@ -125,7 +125,7 @@ public class TypeResolver { JetTypeReference returnTypeRef = type.getReturnTypeRef(); if (returnTypeRef != null) { JetType returnType = resolveType(scope, returnTypeRef); - result[0] = JetStandardClasses.getFunctionType(attributes, receiverType, parameterTypes, returnType); + result[0] = JetStandardClasses.getFunctionType(annotations, receiverType, parameterTypes, returnType); } } diff --git a/idea/src/org/jetbrains/jet/lang/resolve/java/JavaClassMembersScope.java b/idea/src/org/jetbrains/jet/lang/resolve/java/JavaClassMembersScope.java index bf171e74182..16b0e36ed95 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/java/JavaClassMembersScope.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/java/JavaClassMembersScope.java @@ -88,7 +88,7 @@ public class JavaClassMembersScope implements JetScope { boolean isFinal = field.hasModifierProperty(PsiModifier.FINAL); PropertyDescriptor propertyDescriptor = new PropertyDescriptor( containingDeclaration, - Collections.emptyList(), + Collections.emptyList(), new MemberModifiers(false, false, false), !isFinal, field.getName(), diff --git a/idea/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java b/idea/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java index bba08ae3ede..09fff6b982e 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/java/JavaDescriptorResolver.java @@ -19,7 +19,7 @@ import java.util.*; */ public class JavaDescriptorResolver { - /*package*/ static final DeclarationDescriptor JAVA_ROOT = new DeclarationDescriptorImpl(null, Collections.emptyList(), "") { + /*package*/ static final DeclarationDescriptor JAVA_ROOT = new DeclarationDescriptorImpl(null, Collections.emptyList(), "") { @NotNull @Override public DeclarationDescriptor substitute(TypeSubstitutor substitutor) { @@ -84,7 +84,7 @@ public class JavaDescriptorResolver { List supertypes = new ArrayList(); classDescriptor.setTypeConstructor(new TypeConstructorImpl( classDescriptor, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO // TODO modifierList == null ? false : modifierList.hasModifierProperty(PsiModifier.FINAL), name, @@ -102,7 +102,7 @@ public class JavaDescriptorResolver { for (PsiMethod constructor : psiConstructors) { ConstructorDescriptorImpl constructorDescriptor = new ConstructorDescriptorImpl( classDescriptor, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO false); constructorDescriptor.initialize(resolveParameterDescriptors(constructorDescriptor, constructor.getParameterList().getParameters())); classDescriptor.addConstructor(constructorDescriptor); @@ -143,7 +143,7 @@ public class JavaDescriptorResolver { } return new TypeParameterDescriptor( owner, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO Variance.INVARIANT, typeParameter.getName(), upperBounds, @@ -200,7 +200,7 @@ public class JavaDescriptorResolver { private NamespaceDescriptor createJavaNamespaceDescriptor(PsiPackage psiPackage) { NamespaceDescriptor namespaceDescriptor = new NamespaceDescriptor( JAVA_ROOT, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO psiPackage.getName() ); namespaceDescriptor.initialize(new JavaPackageScope(psiPackage.getQualifiedName(), namespaceDescriptor, semanticServices)); @@ -211,7 +211,7 @@ public class JavaDescriptorResolver { private NamespaceDescriptor createJavaNamespaceDescriptor(@NotNull final PsiClass psiClass) { NamespaceDescriptor namespaceDescriptor = new NamespaceDescriptor( JAVA_ROOT, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO psiClass.getName() ); namespaceDescriptor.initialize(new JavaClassMembersScope(namespaceDescriptor, psiClass, semanticServices, true)); @@ -227,7 +227,7 @@ public class JavaDescriptorResolver { result.add(new ValueParameterDescriptorImpl( containingDeclaration, i, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO name == null ? "p" + i : name, null, // TODO : review semanticServices.getTypeTransformer().transformToType(parameter.getType()), @@ -253,7 +253,7 @@ public class JavaDescriptorResolver { FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl( JavaDescriptorResolver.JAVA_ROOT, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO methodName ); functionDescriptor.initialize( diff --git a/idea/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java b/idea/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java index 07f96dbceb2..86836d424a9 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/java/JavaTypeTransformer.java @@ -69,7 +69,7 @@ public class JavaTypeTransformer { PsiTypeParameter typeParameter = (PsiTypeParameter) psiClass; TypeParameterDescriptor typeParameterDescriptor = resolver.resolveTypeParameter(typeParameter); return new JetTypeImpl( - Collections.emptyList(), + Collections.emptyList(), typeParameterDescriptor.getTypeConstructor(), !TypeUtils.hasNullableBound(typeParameterDescriptor), Collections.emptyList(), @@ -99,7 +99,7 @@ public class JavaTypeTransformer { } } return new JetTypeImpl( - Collections.emptyList(), + Collections.emptyList(), descriptor.getTypeConstructor(), true, arguments, diff --git a/idea/src/org/jetbrains/jet/lang/types/Annotated.java b/idea/src/org/jetbrains/jet/lang/types/Annotated.java index 2b04abb1c9d..5d7aef15d40 100644 --- a/idea/src/org/jetbrains/jet/lang/types/Annotated.java +++ b/idea/src/org/jetbrains/jet/lang/types/Annotated.java @@ -6,5 +6,5 @@ import java.util.List; * @author abreslav */ public interface Annotated { - List getAttributes(); + List getAnnotations(); } diff --git a/idea/src/org/jetbrains/jet/lang/types/AnnotatedImpl.java b/idea/src/org/jetbrains/jet/lang/types/AnnotatedImpl.java index e5c8ccf8559..1527a1a9c23 100644 --- a/idea/src/org/jetbrains/jet/lang/types/AnnotatedImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/AnnotatedImpl.java @@ -6,14 +6,14 @@ import java.util.List; * @author abreslav */ public abstract class AnnotatedImpl implements Annotated { - private final List attributes; + private final List annotations; - public AnnotatedImpl(List attributes) { - this.attributes = attributes; + public AnnotatedImpl(List annotations) { + this.annotations = annotations; } @Override - public List getAttributes() { - return attributes; + public List getAnnotations() { + return annotations; } } diff --git a/idea/src/org/jetbrains/jet/lang/types/Attribute.java b/idea/src/org/jetbrains/jet/lang/types/Annotation.java similarity index 69% rename from idea/src/org/jetbrains/jet/lang/types/Attribute.java rename to idea/src/org/jetbrains/jet/lang/types/Annotation.java index 2bc38245de0..e233fa1a1ec 100644 --- a/idea/src/org/jetbrains/jet/lang/types/Attribute.java +++ b/idea/src/org/jetbrains/jet/lang/types/Annotation.java @@ -3,5 +3,5 @@ package org.jetbrains.jet.lang.types; /** * @author abreslav */ -public interface Attribute { +public interface Annotation { } diff --git a/idea/src/org/jetbrains/jet/lang/types/ClassDescriptorImpl.java b/idea/src/org/jetbrains/jet/lang/types/ClassDescriptorImpl.java index b67a6d48346..ca59b4d3861 100644 --- a/idea/src/org/jetbrains/jet/lang/types/ClassDescriptorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/ClassDescriptorImpl.java @@ -21,9 +21,9 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl public ClassDescriptorImpl( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name) { - super(containingDeclaration, attributes, name); + super(containingDeclaration, annotations, name); } public final ClassDescriptorImpl initialize(boolean sealed, @@ -32,7 +32,7 @@ public class ClassDescriptorImpl extends DeclarationDescriptorImpl implements Cl @NotNull JetScope memberDeclarations, @NotNull FunctionGroup constructors, @Nullable ConstructorDescriptor primaryConstructor) { - this.typeConstructor = new TypeConstructorImpl(this, getAttributes(), sealed, getName(), typeParameters, superclasses); + this.typeConstructor = new TypeConstructorImpl(this, getAnnotations(), sealed, getName(), typeParameters, superclasses); this.memberDeclarations = memberDeclarations; this.constructors = constructors; this.primaryConstructor = primaryConstructor; diff --git a/idea/src/org/jetbrains/jet/lang/types/ConstructorDescriptorImpl.java b/idea/src/org/jetbrains/jet/lang/types/ConstructorDescriptorImpl.java index eff4db00ae9..071ff21cdf3 100644 --- a/idea/src/org/jetbrains/jet/lang/types/ConstructorDescriptorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/ConstructorDescriptorImpl.java @@ -12,13 +12,13 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements private final boolean isPrimary; - public ConstructorDescriptorImpl(@NotNull ClassDescriptor containingDeclaration, @NotNull List attributes, boolean isPrimary) { - super(containingDeclaration, attributes, ""); + public ConstructorDescriptorImpl(@NotNull ClassDescriptor containingDeclaration, @NotNull List annotations, boolean isPrimary) { + super(containingDeclaration, annotations, ""); this.isPrimary = isPrimary; } - public ConstructorDescriptorImpl(@NotNull ConstructorDescriptor original, @NotNull List attributes, boolean isPrimary) { - super(original, attributes, ""); + public ConstructorDescriptorImpl(@NotNull ConstructorDescriptor original, @NotNull List annotations, boolean isPrimary) { + super(original, annotations, ""); this.isPrimary = isPrimary; } @@ -65,7 +65,7 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements protected FunctionDescriptorImpl createSubstitutedCopy() { return new ConstructorDescriptorImpl( this, - Collections.emptyList(), // TODO + Collections.emptyList(), // TODO isPrimary); } } diff --git a/idea/src/org/jetbrains/jet/lang/types/DeclarationDescriptorImpl.java b/idea/src/org/jetbrains/jet/lang/types/DeclarationDescriptorImpl.java index 161245cc9b6..32f92cea01f 100644 --- a/idea/src/org/jetbrains/jet/lang/types/DeclarationDescriptorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/DeclarationDescriptorImpl.java @@ -14,8 +14,8 @@ public abstract class DeclarationDescriptorImpl extends AnnotatedImpl implements private final String name; private final DeclarationDescriptor containingDeclaration; - public DeclarationDescriptorImpl(@Nullable DeclarationDescriptor containingDeclaration, List attributes, String name) { - super(attributes); + public DeclarationDescriptorImpl(@Nullable DeclarationDescriptor containingDeclaration, List annotations, String name) { + super(annotations); this.name = name; this.containingDeclaration = containingDeclaration; } diff --git a/idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java b/idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java index 5c70aa2b06a..6a80d9074f3 100644 --- a/idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java +++ b/idea/src/org/jetbrains/jet/lang/types/ErrorUtils.java @@ -80,8 +80,8 @@ public class ErrorUtils { } }; - private static final ClassDescriptorImpl ERROR_CLASS = new ClassDescriptorImpl(ERROR_MODULE, Collections.emptyList(), ""); - private static final ConstructorDescriptor ERROR_CONSTRUCTOR = new ConstructorDescriptorImpl(ERROR_CLASS, Collections.emptyList(), true); + private static final ClassDescriptorImpl ERROR_CLASS = new ClassDescriptorImpl(ERROR_MODULE, Collections.emptyList(), ""); + private static final ConstructorDescriptor ERROR_CONSTRUCTOR = new ConstructorDescriptorImpl(ERROR_CLASS, Collections.emptyList(), true); static { ERROR_CLASS.initialize( true, Collections.emptyList(), Collections.emptyList(), getErrorScope(), ERROR_FUNCTION_GROUP, ERROR_CONSTRUCTOR); @@ -93,10 +93,10 @@ public class ErrorUtils { private static final JetType ERROR_PROPERTY_TYPE = createErrorType(""); private static final VariableDescriptor ERROR_PROPERTY = new PropertyDescriptor( - ERROR_CLASS, Collections.emptyList(), new MemberModifiers(false, false, false), true, "", ERROR_PROPERTY_TYPE, ERROR_PROPERTY_TYPE); + ERROR_CLASS, Collections.emptyList(), new MemberModifiers(false, false, false), true, "", ERROR_PROPERTY_TYPE, ERROR_PROPERTY_TYPE); private static FunctionDescriptor createErrorFunction(List typeParameters, List positionedValueArgumentTypes) { - FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl(ERROR_CLASS, Collections.emptyList(), ""); + FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl(ERROR_CLASS, Collections.emptyList(), ""); return functionDescriptor.initialize( typeParameters, getValueParameters(functionDescriptor, positionedValueArgumentTypes), @@ -109,7 +109,7 @@ public class ErrorUtils { } private static FunctionDescriptor createErrorFunction(int typeParameterCount, List positionedValueParameterTypes) { - return new FunctionDescriptorImpl(ERROR_CLASS, Collections.emptyList(), "").initialize( + return new FunctionDescriptorImpl(ERROR_CLASS, Collections.emptyList(), "").initialize( Collections.emptyList(), // TODO Collections.emptyList(), // TODO createErrorType("") @@ -123,7 +123,7 @@ public class ErrorUtils { result.add(new ValueParameterDescriptorImpl( functionDescriptor, i, - Collections.emptyList(), + Collections.emptyList(), "", ERROR_PARAMETER_TYPE, ERROR_PARAMETER_TYPE, @@ -138,7 +138,7 @@ public class ErrorUtils { } private static JetType createErrorType(String debugMessage, JetScope memberScope) { - return new ErrorTypeImpl(new TypeConstructorImpl(ERROR_CLASS, Collections.emptyList(), false, "[ERROR : " + debugMessage + "]", Collections.emptyList(), Collections.emptyList()), memberScope); + return new ErrorTypeImpl(new TypeConstructorImpl(ERROR_CLASS, Collections.emptyList(), false, "[ERROR : " + debugMessage + "]", Collections.emptyList(), Collections.emptyList()), memberScope); } public static JetType createWrongVarianceErrorType(TypeProjection value) { @@ -192,7 +192,7 @@ public class ErrorUtils { } @Override - public List getAttributes() { + public List getAnnotations() { return Collections.emptyList(); } diff --git a/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorImpl.java b/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorImpl.java index a3ad6e3c2a1..a9e8e8916da 100644 --- a/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorImpl.java @@ -20,17 +20,17 @@ public class FunctionDescriptorImpl extends DeclarationDescriptorImpl implements public FunctionDescriptorImpl( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name) { - super(containingDeclaration, attributes, name); + super(containingDeclaration, annotations, name); this.original = this; } public FunctionDescriptorImpl( @NotNull FunctionDescriptor original, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name) { - super(original.getContainingDeclaration(), attributes, name); + super(original.getContainingDeclaration(), annotations, name); this.original = original; } @@ -108,7 +108,7 @@ public class FunctionDescriptorImpl extends DeclarationDescriptorImpl implements return new FunctionDescriptorImpl( this, // TODO : safeSubstitute - getAttributes(), + getAnnotations(), getName()); } diff --git a/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorUtil.java b/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorUtil.java index 19b0dace901..d8d820477de 100644 --- a/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorUtil.java +++ b/idea/src/org/jetbrains/jet/lang/types/FunctionDescriptorUtil.java @@ -69,7 +69,7 @@ public class FunctionDescriptorUtil { result.add(new ValueParameterDescriptorImpl( substitutedDescriptor, i, - unsubstitutedValueParameter.getAttributes(), + unsubstitutedValueParameter.getAnnotations(), unsubstitutedValueParameter.getName(), unsubstitutedValueParameter.getInType() == null ? null : substitutedType, substitutedType, diff --git a/idea/src/org/jetbrains/jet/lang/types/JetStandardClasses.java b/idea/src/org/jetbrains/jet/lang/types/JetStandardClasses.java index 3c609177b55..89a731c40fa 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetStandardClasses.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetStandardClasses.java @@ -21,11 +21,11 @@ public class JetStandardClasses { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - private static NamespaceDescriptor STANDARD_CLASSES_NAMESPACE = new NamespaceDescriptor(null, Collections.emptyList(), "jet"); + private static NamespaceDescriptor STANDARD_CLASSES_NAMESPACE = new NamespaceDescriptor(null, Collections.emptyList(), "jet"); private static final ClassDescriptor NOTHING_CLASS = new ClassDescriptorImpl( STANDARD_CLASSES_NAMESPACE, - Collections.emptyList(), + Collections.emptyList(), "Nothing" ).initialize( true, @@ -53,7 +53,7 @@ public class JetStandardClasses { private static final JetType NOTHING_TYPE = new JetTypeImpl(getNothing()); private static final JetType NULLABLE_NOTHING_TYPE = new JetTypeImpl( - Collections.emptyList(), + Collections.emptyList(), getNothing().getTypeConstructor(), true, Collections.emptyList(), @@ -63,7 +63,7 @@ public class JetStandardClasses { private static final ClassDescriptor ANY = new ClassDescriptorImpl( STANDARD_CLASSES_NAMESPACE, - Collections.emptyList(), + Collections.emptyList(), "Any").initialize( false, Collections.emptyList(), @@ -91,12 +91,12 @@ public class JetStandardClasses { List parameters = new ArrayList(); ClassDescriptorImpl classDescriptor = new ClassDescriptorImpl( STANDARD_CLASSES_NAMESPACE, - Collections.emptyList(), + Collections.emptyList(), "Tuple" + i); for (int j = 0; j < i; j++) { parameters.add(new TypeParameterDescriptor( classDescriptor, - Collections.emptyList(), + Collections.emptyList(), Variance.OUT_VARIANCE, "T" + j)); } TUPLE[i] = classDescriptor.initialize( @@ -120,7 +120,7 @@ public class JetStandardClasses { for (int i = 0; i < FUNCTION_COUNT; i++) { ClassDescriptorImpl function = new ClassDescriptorImpl( STANDARD_CLASSES_NAMESPACE, - Collections.emptyList(), + Collections.emptyList(), "Function" + i); FUNCTION[i] = function.initialize( false, @@ -129,12 +129,12 @@ public class JetStandardClasses { ClassDescriptorImpl receiverFunction = new ClassDescriptorImpl( STANDARD_CLASSES_NAMESPACE, - Collections.emptyList(), + Collections.emptyList(), "ReceiverFunction" + i); List parameters = createTypeParameters(i, receiverFunction); parameters.add(0, new TypeParameterDescriptor( receiverFunction, - Collections.emptyList(), + Collections.emptyList(), Variance.IN_VARIANCE, "T")); RECEIVER_FUNCTION[i] = receiverFunction.initialize( false, @@ -148,12 +148,12 @@ public class JetStandardClasses { for (int j = 0; j < parameterCount; j++) { parameters.add(new TypeParameterDescriptor( function, - Collections.emptyList(), + Collections.emptyList(), Variance.IN_VARIANCE, "P" + j)); } parameters.add(new TypeParameterDescriptor( function, - Collections.emptyList(), + Collections.emptyList(), Variance.OUT_VARIANCE, "R")); return parameters; } @@ -258,29 +258,29 @@ public class JetStandardClasses { type.getConstructor() == NOTHING_CLASS.getTypeConstructor(); } - public static JetType getTupleType(List attributes, List arguments) { - if (attributes.isEmpty() && arguments.isEmpty()) { + public static JetType getTupleType(List annotations, List arguments) { + if (annotations.isEmpty() && arguments.isEmpty()) { return getUnitType(); } - return new JetTypeImpl(attributes, getTuple(arguments.size()).getTypeConstructor(), false, toProjections(arguments), STUB); + return new JetTypeImpl(annotations, getTuple(arguments.size()).getTypeConstructor(), false, toProjections(arguments), STUB); } public static JetType getTupleType(List arguments) { - return getTupleType(Collections.emptyList(), arguments); + return getTupleType(Collections.emptyList(), arguments); } public static JetType getTupleType(JetType... arguments) { - return getTupleType(Collections.emptyList(), Arrays.asList(arguments)); + return getTupleType(Collections.emptyList(), Arrays.asList(arguments)); } - public static JetType getLabeledTupleType(List attributes, List arguments) { + public static JetType getLabeledTupleType(List annotations, List arguments) { // TODO - return getTupleType(attributes, toTypes(arguments)); + return getTupleType(annotations, toTypes(arguments)); } public static JetType getLabeledTupleType(List arguments) { // TODO - return getLabeledTupleType(Collections.emptyList(), arguments); + return getLabeledTupleType(Collections.emptyList(), arguments); } private static List toProjections(List arguments) { @@ -300,7 +300,7 @@ public class JetStandardClasses { } // TODO : labeled version? - public static JetType getFunctionType(List attributes, @Nullable JetType receiverType, @NotNull List parameterTypes, @NotNull JetType returnType) { + public static JetType getFunctionType(List annotations, @Nullable JetType receiverType, @NotNull List parameterTypes, @NotNull JetType returnType) { List arguments = new ArrayList(); if (receiverType != null) { arguments.add(defaultProjection(receiverType)); @@ -311,7 +311,7 @@ public class JetStandardClasses { arguments.add(defaultProjection(returnType)); int size = parameterTypes.size(); TypeConstructor constructor = receiverType == null ? FUNCTION[size].getTypeConstructor() : RECEIVER_FUNCTION[size].getTypeConstructor(); - return new JetTypeImpl(attributes, constructor, false, arguments, STUB); + return new JetTypeImpl(annotations, constructor, false, arguments, STUB); } private static TypeProjection defaultProjection(JetType returnType) { diff --git a/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java b/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java index 972fb5fe96a..8179ef03b7c 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetStandardLibrary.java @@ -217,7 +217,7 @@ public class JetStandardLibrary { public JetType getArrayType(@NotNull Variance variance, @NotNull JetType argument) { List types = Collections.singletonList(new TypeProjection(variance, argument)); return new JetTypeImpl( - Collections.emptyList(), + Collections.emptyList(), getArray().getTypeConstructor(), false, types, @@ -229,7 +229,7 @@ public class JetStandardLibrary { public JetType getIterableType(@NotNull JetType argument) { List types = Collections.singletonList(new TypeProjection(Variance.INVARIANT, argument)); return new JetTypeImpl( - Collections.emptyList(), + Collections.emptyList(), getIterable().getTypeConstructor(), false, types, diff --git a/idea/src/org/jetbrains/jet/lang/types/JetTypeChecker.java b/idea/src/org/jetbrains/jet/lang/types/JetTypeChecker.java index 0e3063979a4..2bb2efe33d5 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetTypeChecker.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetTypeChecker.java @@ -134,7 +134,7 @@ public class JetTypeChecker { } // TODO : attributes? - return new JetTypeImpl(Collections.emptyList(), constructor, nullable, newProjections, JetStandardClasses.STUB); + return new JetTypeImpl(Collections.emptyList(), constructor, nullable, newProjections, JetStandardClasses.STUB); } @NotNull diff --git a/idea/src/org/jetbrains/jet/lang/types/JetTypeImpl.java b/idea/src/org/jetbrains/jet/lang/types/JetTypeImpl.java index 49b4b43178c..5332fd82f96 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetTypeImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetTypeImpl.java @@ -17,8 +17,8 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType { private final boolean nullable; private JetScope memberScope; - public JetTypeImpl(List attributes, TypeConstructor constructor, boolean nullable, List arguments, JetScope memberScope) { - super(attributes); + public JetTypeImpl(List annotations, TypeConstructor constructor, boolean nullable, List arguments, JetScope memberScope) { + super(annotations); this.constructor = constructor; this.nullable = nullable; this.arguments = arguments; @@ -26,11 +26,11 @@ public final class JetTypeImpl extends AnnotatedImpl implements JetType { } public JetTypeImpl(TypeConstructor constructor, JetScope memberScope) { - this(Collections.emptyList(), constructor, false, Collections.emptyList(), memberScope); + this(Collections.emptyList(), constructor, false, Collections.emptyList(), memberScope); } public JetTypeImpl(@NotNull ClassDescriptor classDescriptor) { - this(Collections.emptyList(), + this(Collections.emptyList(), classDescriptor.getTypeConstructor(), false, Collections.emptyList(), diff --git a/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java b/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java index 6ff6a22f8d6..cfcd0909d2a 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java @@ -684,7 +684,7 @@ public class JetTypeInferrer { return; } - FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl(scope.getContainingDeclaration(), Collections.emptyList(), ""); + FunctionDescriptorImpl functionDescriptor = new FunctionDescriptorImpl(scope.getContainingDeclaration(), Collections.emptyList(), ""); JetTypeReference returnTypeRef = expression.getReturnTypeRef(); @@ -721,7 +721,7 @@ public class JetTypeInferrer { } JetType effectiveReceiverType = receiverTypeRef == null ? null : receiverType; JetType safeReturnType = returnType == null ? ErrorUtils.createErrorType("") : returnType; - result = JetStandardClasses.getFunctionType(Collections.emptyList(), effectiveReceiverType, parameterTypes, safeReturnType); + result = JetStandardClasses.getFunctionType(Collections.emptyList(), effectiveReceiverType, parameterTypes, safeReturnType); } @Override diff --git a/idea/src/org/jetbrains/jet/lang/types/LocalVariableDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/LocalVariableDescriptor.java index b38d65f89aa..671d4310b3a 100644 --- a/idea/src/org/jetbrains/jet/lang/types/LocalVariableDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/LocalVariableDescriptor.java @@ -11,11 +11,11 @@ import java.util.List; public class LocalVariableDescriptor extends VariableDescriptorImpl { public LocalVariableDescriptor( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name, @Nullable JetType type, boolean mutable) { - super(containingDeclaration, attributes, name, mutable ? type : null, type); + super(containingDeclaration, annotations, name, mutable ? type : null, type); } @NotNull diff --git a/idea/src/org/jetbrains/jet/lang/types/ModuleDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/ModuleDescriptor.java index 7579a7f97a0..444b639c4bd 100644 --- a/idea/src/org/jetbrains/jet/lang/types/ModuleDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/ModuleDescriptor.java @@ -9,7 +9,7 @@ import java.util.Collections; */ public class ModuleDescriptor extends DeclarationDescriptorImpl { public ModuleDescriptor(String name) { - super(null, Collections.emptyList(), name); + super(null, Collections.emptyList(), name); } @NotNull diff --git a/idea/src/org/jetbrains/jet/lang/types/NamespaceDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/NamespaceDescriptor.java index 3a23fc65a40..ca04d87fefe 100644 --- a/idea/src/org/jetbrains/jet/lang/types/NamespaceDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/NamespaceDescriptor.java @@ -14,8 +14,8 @@ public class NamespaceDescriptor extends DeclarationDescriptorImpl { private JetScope memberScope; - public NamespaceDescriptor(@Nullable DeclarationDescriptor containingDeclaration, @NotNull List attributes, @NotNull String name) { - super(containingDeclaration, attributes, name); + public NamespaceDescriptor(@Nullable DeclarationDescriptor containingDeclaration, @NotNull List annotations, @NotNull String name) { + super(containingDeclaration, annotations, name); } public void initialize(@NotNull JetScope memberScope) { diff --git a/idea/src/org/jetbrains/jet/lang/types/NamespaceType.java b/idea/src/org/jetbrains/jet/lang/types/NamespaceType.java index 3f96c27a153..9985c31255b 100644 --- a/idea/src/org/jetbrains/jet/lang/types/NamespaceType.java +++ b/idea/src/org/jetbrains/jet/lang/types/NamespaceType.java @@ -51,7 +51,7 @@ public class NamespaceType implements JetType { } @Override - public List getAttributes() { + public List getAnnotations() { throwException(); return null; } diff --git a/idea/src/org/jetbrains/jet/lang/types/PropertyAccessorDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/PropertyAccessorDescriptor.java index c4133f928e5..ae7e02159d6 100644 --- a/idea/src/org/jetbrains/jet/lang/types/PropertyAccessorDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/PropertyAccessorDescriptor.java @@ -12,8 +12,8 @@ public abstract class PropertyAccessorDescriptor extends DeclarationDescriptorIm private final boolean hasBody; - protected PropertyAccessorDescriptor(@NotNull PropertyDescriptor correspondingProperty, @NotNull List attributes, @NotNull String name, boolean hasBody) { - super(correspondingProperty.getContainingDeclaration(), attributes, name); + protected PropertyAccessorDescriptor(@NotNull PropertyDescriptor correspondingProperty, @NotNull List annotations, @NotNull String name, boolean hasBody) { + super(correspondingProperty.getContainingDeclaration(), annotations, name); this.hasBody = hasBody; } diff --git a/idea/src/org/jetbrains/jet/lang/types/PropertyDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/PropertyDescriptor.java index b73338ebc2c..9ea259a05eb 100644 --- a/idea/src/org/jetbrains/jet/lang/types/PropertyDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/PropertyDescriptor.java @@ -17,13 +17,13 @@ public class PropertyDescriptor extends VariableDescriptorImpl implements Member public PropertyDescriptor( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull MemberModifiers memberModifiers, boolean isVar, @NotNull String name, @Nullable JetType inType, @Nullable JetType outType) { - super(containingDeclaration, attributes, name, inType, outType); + super(containingDeclaration, annotations, name, inType, outType); assert !isVar || inType != null; assert outType != null; this.isVar = isVar; @@ -36,7 +36,7 @@ public class PropertyDescriptor extends VariableDescriptorImpl implements Member @Nullable JetType outType) { this( original.getContainingDeclaration(), - original.getAttributes(), // TODO : substitute? + original.getAnnotations(), // TODO : substitute? original.getModifiers(), original.isVar, original.getName(), diff --git a/idea/src/org/jetbrains/jet/lang/types/PropertyGetterDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/PropertyGetterDescriptor.java index 875d2999d89..0123da6bb86 100644 --- a/idea/src/org/jetbrains/jet/lang/types/PropertyGetterDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/PropertyGetterDescriptor.java @@ -12,8 +12,8 @@ import java.util.List; public class PropertyGetterDescriptor extends PropertyAccessorDescriptor implements MutableFunctionDescriptor { private JetType returnType; - public PropertyGetterDescriptor(@NotNull PropertyDescriptor correspondingProperty, @NotNull List attributes, @Nullable JetType returnType, boolean hasBody) { - super(correspondingProperty, attributes, "get-" + correspondingProperty.getName(), hasBody); + public PropertyGetterDescriptor(@NotNull PropertyDescriptor correspondingProperty, @NotNull List annotations, @Nullable JetType returnType, boolean hasBody) { + super(correspondingProperty, annotations, "get-" + correspondingProperty.getName(), hasBody); this.returnType = returnType == null ? correspondingProperty.getOutType() : returnType; } diff --git a/idea/src/org/jetbrains/jet/lang/types/PropertySetterDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/PropertySetterDescriptor.java index bd8a134a608..eaa59216d23 100644 --- a/idea/src/org/jetbrains/jet/lang/types/PropertySetterDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/PropertySetterDescriptor.java @@ -12,8 +12,8 @@ public class PropertySetterDescriptor extends PropertyAccessorDescriptor impleme private MutableValueParameterDescriptor parameter; - public PropertySetterDescriptor(@NotNull PropertyDescriptor correspondingProperty, @NotNull List attributes, boolean hasBody) { - super(correspondingProperty, attributes, "set-" + correspondingProperty.getName(), hasBody); + public PropertySetterDescriptor(@NotNull PropertyDescriptor correspondingProperty, @NotNull List annotations, boolean hasBody) { + super(correspondingProperty, annotations, "set-" + correspondingProperty.getName(), hasBody); } public void initialize(@NotNull MutableValueParameterDescriptor parameter) { diff --git a/idea/src/org/jetbrains/jet/lang/types/TypeConstructorImpl.java b/idea/src/org/jetbrains/jet/lang/types/TypeConstructorImpl.java index dd810fb4afe..16dc81e56c1 100644 --- a/idea/src/org/jetbrains/jet/lang/types/TypeConstructorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/TypeConstructorImpl.java @@ -21,12 +21,12 @@ public class TypeConstructorImpl extends AnnotatedImpl implements TypeConstructo public TypeConstructorImpl( @Nullable DeclarationDescriptor declarationDescriptor, - @NotNull List attributes, + @NotNull List annotations, boolean sealed, @NotNull String debugName, @NotNull List parameters, @NotNull Collection supertypes) { - super(attributes); + super(annotations); this.declarationDescriptor = declarationDescriptor; this.sealed = sealed; this.debugName = debugName; diff --git a/idea/src/org/jetbrains/jet/lang/types/TypeParameterDescriptor.java b/idea/src/org/jetbrains/jet/lang/types/TypeParameterDescriptor.java index 0a089b661fd..8966b99ee24 100644 --- a/idea/src/org/jetbrains/jet/lang/types/TypeParameterDescriptor.java +++ b/idea/src/org/jetbrains/jet/lang/types/TypeParameterDescriptor.java @@ -17,18 +17,18 @@ public class TypeParameterDescriptor extends DeclarationDescriptorImpl implement public TypeParameterDescriptor( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull Variance variance, @NotNull String name, @NotNull Set upperBounds, @NotNull JetType boundsAsType) { - super(containingDeclaration, attributes, name); + super(containingDeclaration, annotations, name); this.variance = variance; this.upperBounds = upperBounds; - // TODO: Should we actually pass the attributes on to the type constructor? + // TODO: Should we actually pass the annotations on to the type constructor? this.typeConstructor = new TypeConstructorImpl( this, - attributes, + annotations, false, "&" + name, Collections.emptyList(), @@ -38,12 +38,12 @@ public class TypeParameterDescriptor extends DeclarationDescriptorImpl implement public TypeParameterDescriptor( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull Variance variance, @NotNull String name) { this( containingDeclaration, - attributes, + annotations, variance, name, Collections.singleton(JetStandardClasses.getNullableAnyType()), diff --git a/idea/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java b/idea/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java index 66ca5f291c4..14ab2f2cac3 100644 --- a/idea/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java +++ b/idea/src/org/jetbrains/jet/lang/types/TypeSubstitutor.java @@ -94,7 +94,7 @@ public class TypeSubstitutor { callSiteVariance)); } return new JetTypeImpl( - subjectType.getAttributes(), + subjectType.getAnnotations(), subjectType.getConstructor(), subjectType.isNullable(), newArguments, diff --git a/idea/src/org/jetbrains/jet/lang/types/TypeUtils.java b/idea/src/org/jetbrains/jet/lang/types/TypeUtils.java index 756d655c420..f0ef8b0648e 100644 --- a/idea/src/org/jetbrains/jet/lang/types/TypeUtils.java +++ b/idea/src/org/jetbrains/jet/lang/types/TypeUtils.java @@ -24,7 +24,7 @@ public class TypeUtils { if (type.isNullable() == nullable) { return type; } - return new JetTypeImpl(type.getAttributes(), type.getConstructor(), nullable, type.getArguments(), type.getMemberScope()); + return new JetTypeImpl(type.getAnnotations(), type.getConstructor(), nullable, type.getArguments(), type.getMemberScope()); } @NotNull @@ -64,10 +64,10 @@ public class TypeUtils { } } - List noAttributes = Collections.emptyList(); - TypeConstructor constructor = new TypeConstructorImpl(null, noAttributes, false, debugName.toString(), Collections.emptyList(), types); + List noAnnotations = Collections.emptyList(); + TypeConstructor constructor = new TypeConstructorImpl(null, noAnnotations, false, debugName.toString(), Collections.emptyList(), types); return new JetTypeImpl( - noAttributes, + noAnnotations, constructor, nullable, Collections.emptyList(), @@ -159,7 +159,7 @@ public class TypeUtils { public static JetType makeUnsubstitutedType(ClassDescriptor classDescriptor, JetScope unsubstitutedMemberScope) { List arguments = getArguments(classDescriptor); return new JetTypeImpl( - Collections.emptyList(), + Collections.emptyList(), classDescriptor.getTypeConstructor(), false, arguments, diff --git a/idea/src/org/jetbrains/jet/lang/types/ValueParameterDescriptorImpl.java b/idea/src/org/jetbrains/jet/lang/types/ValueParameterDescriptorImpl.java index bd6bd623ff0..2eab4045570 100644 --- a/idea/src/org/jetbrains/jet/lang/types/ValueParameterDescriptorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/ValueParameterDescriptorImpl.java @@ -17,13 +17,13 @@ public class ValueParameterDescriptorImpl extends VariableDescriptorImpl impleme public ValueParameterDescriptorImpl( @NotNull DeclarationDescriptor containingDeclaration, int index, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name, @Nullable JetType inType, @NotNull JetType outType, boolean hasDefaultValue, boolean isVararg) { - super(containingDeclaration, attributes, name, inType, outType); + super(containingDeclaration, annotations, name, inType, outType); this.index = index; this.hasDefaultValue = hasDefaultValue; this.isVararg = isVararg; @@ -33,12 +33,12 @@ public class ValueParameterDescriptorImpl extends VariableDescriptorImpl impleme public ValueParameterDescriptorImpl( @NotNull DeclarationDescriptor containingDeclaration, int index, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name, boolean isVar, boolean hasDefaultValue, boolean isVararg) { - super(containingDeclaration, attributes, name, null, null); + super(containingDeclaration, annotations, name, null, null); this.index = index; this.hasDefaultValue = hasDefaultValue; this.isVararg = isVararg; diff --git a/idea/src/org/jetbrains/jet/lang/types/VariableDescriptorImpl.java b/idea/src/org/jetbrains/jet/lang/types/VariableDescriptorImpl.java index 8af5b5900bd..9175ceed35d 100644 --- a/idea/src/org/jetbrains/jet/lang/types/VariableDescriptorImpl.java +++ b/idea/src/org/jetbrains/jet/lang/types/VariableDescriptorImpl.java @@ -14,11 +14,11 @@ public abstract class VariableDescriptorImpl extends DeclarationDescriptorImpl i public VariableDescriptorImpl( @NotNull DeclarationDescriptor containingDeclaration, - @NotNull List attributes, + @NotNull List annotations, @NotNull String name, @Nullable JetType inType, @Nullable JetType outType) { - super(containingDeclaration, attributes, name); + super(containingDeclaration, annotations, name); assert (inType != null) || (outType != null); this.inType = inType; -- GitLab