@NotNull annotations on descriptor classes
This commit is contained in:
@@ -16,11 +16,13 @@
|
||||
|
||||
package org.jetbrains.jet.lang.descriptors.annotations;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.ReadOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Annotated {
|
||||
@ReadOnly
|
||||
@NotNull
|
||||
List<AnnotationDescriptor> getAnnotations();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.jet.lang.descriptors.annotations;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AnnotatedImpl implements Annotated {
|
||||
@@ -25,6 +27,7 @@ public abstract class AnnotatedImpl implements Annotated {
|
||||
this.annotations = annotations;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return annotations;
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public abstract class AbstractClassDescriptor implements ClassDescriptor {
|
||||
return this;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected abstract JetScope getScopeForMemberLookup();
|
||||
|
||||
@NotNull
|
||||
|
||||
+2
@@ -179,6 +179,7 @@ public abstract class AbstractLazyTypeParameterDescriptor implements TypeParamet
|
||||
return AbstractLazyTypeParameterDescriptor.this;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return AbstractLazyTypeParameterDescriptor.this.getAnnotations();
|
||||
@@ -248,6 +249,7 @@ public abstract class AbstractLazyTypeParameterDescriptor implements TypeParamet
|
||||
return index;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return Collections.emptyList(); // TODO
|
||||
|
||||
+1
@@ -117,6 +117,7 @@ public class LazySubstitutingClassDescriptor implements ClassDescriptor {
|
||||
return r;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return original.getAnnotations();
|
||||
|
||||
+1
@@ -210,6 +210,7 @@ public abstract class MutableClassDescriptorLite extends ClassDescriptorBase {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return annotations;
|
||||
|
||||
+1
@@ -49,6 +49,7 @@ public abstract class NumberValueTypeConstructor implements TypeConstructor {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -406,6 +406,7 @@ public class ErrorUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -57,6 +57,7 @@ public final class JetTypeImpl extends AbstractJetType {
|
||||
classDescriptor.getMemberScope(Collections.<TypeProjection>emptyList()));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
return annotations;
|
||||
|
||||
@@ -78,6 +78,7 @@ public class NamespaceType implements JetType {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
throwException();
|
||||
|
||||
@@ -84,6 +84,7 @@ public class TypeUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> getAnnotations() {
|
||||
throw new IllegalStateException(name);
|
||||
|
||||
Reference in New Issue
Block a user