Refactoring: remove absent annotation warning
This commit is contained in:
@@ -33,6 +33,7 @@ public class JetExpressionCodeFragmentType extends JetFileElementType {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getExternalId() {
|
||||
return NAME;
|
||||
|
||||
@@ -33,6 +33,7 @@ public class JetTypeCodeFragmentType extends JetFileElementType {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getExternalId() {
|
||||
return NAME;
|
||||
|
||||
+4
-3
@@ -55,18 +55,19 @@ public class JetAnnotationElementType extends JetStubElementType<PsiJetAnnotatio
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetAnnotationStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetAnnotationStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getShortName());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetAnnotationStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetAnnotationStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef text = dataStream.readName();
|
||||
return new PsiJetAnnotationStubImpl(parentStub, JetStubElementTypes.ANNOTATION_ENTRY, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetAnnotationStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetAnnotationStub stub, @NotNull IndexSink sink) {
|
||||
StubIndexServiceFactory.getInstance().indexAnnotation(stub, sink);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -59,7 +59,7 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetClassStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetClassStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getName());
|
||||
FqName fqName = stub.getFqName();
|
||||
dataStream.writeName(fqName == null ? null : fqName.asString());
|
||||
@@ -76,8 +76,9 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetClassStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetClassStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef name = dataStream.readName();
|
||||
StringRef qualifiedName = dataStream.readName();
|
||||
boolean isTrait = dataStream.readBoolean();
|
||||
@@ -97,7 +98,7 @@ public class JetClassElementType extends JetStubElementType<PsiJetClassStub, Jet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetClassStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetClassStub stub, @NotNull IndexSink sink) {
|
||||
StubIndexServiceFactory.getInstance().indexClass(stub, sink);
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -56,20 +56,22 @@ public class JetFileElementType extends IStubFileElementType<PsiJetFileStub> {
|
||||
return STUB_VERSION;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getExternalId() {
|
||||
return "jet.FILE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetFileStub stub, StubOutputStream dataStream)
|
||||
public void serialize(@NotNull PsiJetFileStub stub, @NotNull StubOutputStream dataStream)
|
||||
throws IOException {
|
||||
dataStream.writeName(stub.getPackageName());
|
||||
dataStream.writeBoolean(stub.isScript());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetFileStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetFileStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef packName = dataStream.readName();
|
||||
boolean isScript = dataStream.readBoolean();
|
||||
return new PsiJetFileStubImpl(null, packName, isScript);
|
||||
@@ -85,7 +87,7 @@ public class JetFileElementType extends IStubFileElementType<PsiJetFileStub> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetFileStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetFileStub stub, @NotNull IndexSink sink) {
|
||||
StubIndexServiceFactory.getInstance().indexFile(stub, sink);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -73,7 +73,7 @@ public class JetFunctionElementType extends JetStubElementType<PsiJetFunctionStu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetFunctionStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetFunctionStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getName());
|
||||
dataStream.writeBoolean(stub.isTopLevel());
|
||||
|
||||
@@ -83,8 +83,9 @@ public class JetFunctionElementType extends JetStubElementType<PsiJetFunctionStu
|
||||
dataStream.writeBoolean(stub.isExtension());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetFunctionStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetFunctionStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef name = dataStream.readName();
|
||||
boolean isTopLevel = dataStream.readBoolean();
|
||||
|
||||
@@ -97,7 +98,7 @@ public class JetFunctionElementType extends JetStubElementType<PsiJetFunctionStu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetFunctionStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetFunctionStub stub, @NotNull IndexSink sink) {
|
||||
StubIndexServiceFactory.getInstance().indexFunction(stub, sink);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -69,7 +69,7 @@ public class JetObjectElementType extends JetStubElementType<PsiJetObjectStub, J
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetObjectStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetObjectStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getName());
|
||||
FqName fqName = stub.getFqName();
|
||||
dataStream.writeName(fqName != null ? fqName.toString() : null);
|
||||
@@ -77,8 +77,9 @@ public class JetObjectElementType extends JetStubElementType<PsiJetObjectStub, J
|
||||
dataStream.writeBoolean(stub.isClassObject());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetObjectStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetObjectStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef name = dataStream.readName();
|
||||
StringRef fqNameStr = dataStream.readName();
|
||||
FqName fqName = fqNameStr != null ? new FqName(fqNameStr.toString()) : null;
|
||||
@@ -89,7 +90,7 @@ public class JetObjectElementType extends JetStubElementType<PsiJetObjectStub, J
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetObjectStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetObjectStub stub, @NotNull IndexSink sink) {
|
||||
StubIndexServiceFactory.getInstance().indexObject(stub, sink);
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -64,7 +64,7 @@ public class JetParameterElementType extends JetStubElementType<PsiJetParameterS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetParameterStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetParameterStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getName());
|
||||
dataStream.writeBoolean(stub.isMutable());
|
||||
dataStream.writeBoolean(stub.isVarArg());
|
||||
@@ -72,8 +72,9 @@ public class JetParameterElementType extends JetStubElementType<PsiJetParameterS
|
||||
dataStream.writeName(stub.getDefaultValueText());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetParameterStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef name = dataStream.readName();
|
||||
boolean isMutable = dataStream.readBoolean();
|
||||
boolean isVarArg = dataStream.readBoolean();
|
||||
@@ -85,7 +86,7 @@ public class JetParameterElementType extends JetStubElementType<PsiJetParameterS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetParameterStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetParameterStub stub, @NotNull IndexSink sink) {
|
||||
// No index
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -50,17 +50,18 @@ public class JetParameterListElementType extends JetStubElementType<PsiJetParame
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetParameterListStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetParameterListStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
// Nothing to serialize
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetParameterListStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetParameterListStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
return new PsiJetParameterListStubImpl(JetStubElementTypes.VALUE_PARAMETER_LIST, parentStub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetParameterListStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetParameterListStub stub, @NotNull IndexSink sink) {
|
||||
// No index
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -79,7 +79,7 @@ public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetPropertyStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetPropertyStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getName());
|
||||
dataStream.writeBoolean(stub.isVar());
|
||||
dataStream.writeBoolean(stub.isTopLevel());
|
||||
@@ -91,8 +91,9 @@ public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStu
|
||||
dataStream.writeName(stub.getInferenceBodyText());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetPropertyStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetPropertyStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef name = dataStream.readName();
|
||||
boolean isVar = dataStream.readBoolean();
|
||||
boolean isTopLevel = dataStream.readBoolean();
|
||||
@@ -108,7 +109,7 @@ public class JetPropertyElementType extends JetStubElementType<PsiJetPropertyStu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetPropertyStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetPropertyStub stub, @NotNull IndexSink sink) {
|
||||
StubIndexServiceFactory.getInstance().indexProperty(stub, sink);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -34,6 +34,7 @@ public abstract class JetStubElementType<StubT extends StubElement, PsiT extends
|
||||
|
||||
public abstract PsiT createPsiFromAst(@NotNull ASTNode node);
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getExternalId() {
|
||||
return "jet." + toString();
|
||||
|
||||
+4
-3
@@ -58,15 +58,16 @@ public class JetTypeParameterElementType extends JetStubElementType<PsiJetTypePa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetTypeParameterStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetTypeParameterStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
dataStream.writeName(stub.getName());
|
||||
dataStream.writeName(stub.getExtendBoundTypeText());
|
||||
dataStream.writeBoolean(stub.isInVariance());
|
||||
dataStream.writeBoolean(stub.isOutVariance());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetTypeParameterStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetTypeParameterStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
StringRef name = dataStream.readName();
|
||||
StringRef extendBoundTypeText = dataStream.readName();
|
||||
boolean isInVariance = dataStream.readBoolean();
|
||||
@@ -77,7 +78,7 @@ public class JetTypeParameterElementType extends JetStubElementType<PsiJetTypePa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetTypeParameterStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetTypeParameterStub stub, @NotNull IndexSink sink) {
|
||||
// No index
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -50,17 +50,18 @@ public class JetTypeParameterListElementType extends JetStubElementType<PsiJetTy
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(PsiJetTypeParameterListStub stub, StubOutputStream dataStream) throws IOException {
|
||||
public void serialize(@NotNull PsiJetTypeParameterListStub stub, @NotNull StubOutputStream dataStream) throws IOException {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiJetTypeParameterListStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
public PsiJetTypeParameterListStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
return new PsiJetTypeParameterListStubImpl(JetStubElementTypes.TYPE_PARAMETER_LIST, parentStub);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(PsiJetTypeParameterListStub stub, IndexSink sink) {
|
||||
public void indexStub(@NotNull PsiJetTypeParameterListStub stub, @NotNull IndexSink sink) {
|
||||
// No index
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user