From cd3ee635f8a5c19ed0736dcf0dff72ce0f5a27e9 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Thu, 27 Jun 2019 18:46:34 +0300 Subject: [PATCH] [uast] add UAnnotated#uAnnotations instead of #annotations GitOrigin-RevId: 61851be3b0a9526ecb21d6f4f6b91b833f306d28 --- .../reference/RefClassImpl.java | 4 +-- .../reference/RefFieldImpl.java | 4 +-- .../reference/RefParameterImpl.java | 4 +-- .../UnstableTypeUsedInSignatureInspection.kt | 2 +- .../plugins/groovy/lang/psi/uast/GrUClass.kt | 8 ++--- .../plugins/groovy/lang/psi/uast/GrUFile.kt | 6 ++-- .../lang/psi/uast/GrUReferenceExpression.kt | 4 +-- .../groovy/lang/psi/uast/GroovyUastPlugin.kt | 8 ++--- .../uast/baseElements/UExpression.kt | 35 +++++++++---------- .../controlStructures/UDoWhileExpression.kt | 18 ++-------- .../controlStructures/UForEachExpression.kt | 18 ++-------- .../uast/controlStructures/UForExpression.kt | 18 ++-------- .../uast/controlStructures/UIfExpression.kt | 18 ++-------- .../controlStructures/USwitchExpression.kt | 22 +++--------- .../uast/controlStructures/UTryExpression.kt | 18 ++-------- .../controlStructures/UWhileExpression.kt | 18 ++-------- .../org/jetbrains/uast/declarations/UClass.kt | 18 ++-------- .../uast/declarations/UClassInitializer.kt | 18 ++-------- .../org/jetbrains/uast/declarations/UFile.kt | 22 +++--------- .../jetbrains/uast/declarations/UMethod.kt | 28 ++++----------- .../jetbrains/uast/declarations/UVariable.kt | 28 ++++----------- .../expressions/UArrayAccessExpression.kt | 18 ++-------- .../uast/expressions/UBinaryExpression.kt | 18 ++-------- .../expressions/UBinaryExpressionWithType.kt | 18 ++-------- .../uast/expressions/UBlockExpression.kt | 18 ++-------- .../uast/expressions/UBreakExpression.kt | 20 ++--------- .../uast/expressions/UCallExpression.kt | 18 ++-------- .../UCallableReferenceExpression.kt | 18 ++-------- .../expressions/UClassLiteralExpression.kt | 18 ++-------- .../uast/expressions/UContinueExpression.kt | 18 ++-------- .../expressions/UDeclarationsExpression.kt | 18 ++-------- .../uast/expressions/UExpressionList.kt | 18 ++-------- .../uast/expressions/ULabeledExpression.kt | 18 ++-------- .../uast/expressions/ULambdaExpression.kt | 18 ++-------- .../uast/expressions/ULiteralExpression.kt | 18 ++-------- .../uast/expressions/UNamedExpression.kt | 18 ++-------- .../expressions/UObjectLiteralExpression.kt | 18 ++-------- .../expressions/UParenthesizedExpression.kt | 18 ++-------- .../uast/expressions/UPolyadicExpression.kt | 18 ++-------- .../UQualifiedReferenceExpression.kt | 18 ++-------- .../uast/expressions/UReturnExpression.kt | 18 ++-------- .../USimpleNameReferenceExpression.kt | 18 ++-------- .../uast/expressions/USuperExpression.kt | 18 ++-------- .../uast/expressions/UThisExpression.kt | 18 ++-------- .../uast/expressions/UThrowExpression.kt | 18 ++-------- .../expressions/UTypeReferenceExpression.kt | 18 ++-------- .../uast/expressions/UUnaryExpression.kt | 22 +++--------- .../uast/java/JavaAbstractUElement.kt | 18 ++-------- .../JavaUSwitchExpression.kt | 20 ++--------- .../uast/java/declarations/JavaUClass.kt | 18 ++-------- .../declarations/JavaUClassInitializer.kt | 18 ++-------- .../uast/java/declarations/JavaUFile.kt | 18 ++-------- .../uast/java/declarations/JavaUMethod.kt | 4 +-- .../uast/java/declarations/JavaUVariable.kt | 18 ++-------- .../JavaUDeclarationsExpression.kt | 18 ++-------- .../java/expressions/UnknownJavaExpression.kt | 18 ++-------- 56 files changed, 148 insertions(+), 795 deletions(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefClassImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefClassImpl.java index 9d9dacd99399..3f4de5136a3d 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefClassImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefClassImpl.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInspection.reference; @@ -292,7 +292,7 @@ public class RefClassImpl extends RefJavaElementImpl implements RefClass { RefJavaUtil.getInstance().addReferencesTo(uClass, this, classInitializer.getUastBody()); } - RefJavaUtil.getInstance().addReferencesTo(uClass, this, ((UAnnotated)uClass).getAnnotations().toArray(UElementKt.EMPTY_ARRAY)); + RefJavaUtil.getInstance().addReferencesTo(uClass, this, ((UAnnotated)uClass).getUAnnotations().toArray(UElementKt.EMPTY_ARRAY)); for (PsiTypeParameter parameter : uClass.getJavaPsi().getTypeParameters()) { UElement uTypeParameter = UastContextKt.toUElement(parameter); diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefFieldImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefFieldImpl.java index a74f11aecf25..85d048061d8d 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefFieldImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefFieldImpl.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInspection.reference; import com.intellij.openapi.application.ApplicationManager; @@ -126,7 +126,7 @@ public class RefFieldImpl extends RefJavaElementImpl implements RefField { if (uField != null) { final RefJavaUtil refUtil = RefJavaUtil.getInstance(); refUtil.addReferencesTo(uField, this, uField.getUastInitializer()); - refUtil.addReferencesTo(uField, this, ((UAnnotated)uField).getAnnotations().toArray(UElementKt.EMPTY_ARRAY)); + refUtil.addReferencesTo(uField, this, ((UAnnotated)uField).getUAnnotations().toArray(UElementKt.EMPTY_ARRAY)); if (uField instanceof UEnumConstant) { refUtil.addReferencesTo(uField, this, uField); } diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefParameterImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefParameterImpl.java index f30b85676b49..843b8d3ae6fe 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefParameterImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefParameterImpl.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInspection.reference; @@ -99,7 +99,7 @@ public class RefParameterImpl extends RefJavaElementImpl implements RefParameter final RefJavaUtil refUtil = RefJavaUtil.getInstance(); final UParameter parameter = getUastElement(); if (parameter != null) { - List annotations = ((UAnnotated)parameter).getAnnotations(); + List annotations = ((UAnnotated)parameter).getUAnnotations(); refUtil.addReferencesTo(parameter, this, annotations.toArray(UElementKt.EMPTY_ARRAY)); UTypeReferenceExpression typeReference = parameter.getTypeReference(); refUtil.addReferencesTo(parameter, this, typeReference); diff --git a/jvm/jvm-analysis-impl/src/com/intellij/codeInspection/UnstableTypeUsedInSignatureInspection.kt b/jvm/jvm-analysis-impl/src/com/intellij/codeInspection/UnstableTypeUsedInSignatureInspection.kt index f96387a0bd52..74a890e9bb28 100644 --- a/jvm/jvm-analysis-impl/src/com/intellij/codeInspection/UnstableTypeUsedInSignatureInspection.kt +++ b/jvm/jvm-analysis-impl/src/com/intellij/codeInspection/UnstableTypeUsedInSignatureInspection.kt @@ -101,7 +101,7 @@ private class UnstableTypeUsedInSignatureVisitor( } private fun isInsideUnstableDeclaration(node: UDeclaration): Boolean { - if (node.annotations.any { it.qualifiedName in unstableApiAnnotations }) { + if (node.uAnnotations.any { it.qualifiedName in unstableApiAnnotations }) { return true } val containingClass = node.getContainingUClass() diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUClass.kt b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUClass.kt index a4dac5d9fc91..f2633ee1db09 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUClass.kt +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUClass.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.psi.uast import com.intellij.psi.* @@ -35,7 +35,7 @@ class GrUClass(val grElement: GrTypeDefinition, override val uastParent: UElement? by lazy(parentProvider) - override val annotations: List by lazy { grAnnotations(grElement.modifierList, this) } + override val uAnnotations: List by lazy { grAnnotations(grElement.modifierList, this) } override fun getSuperClass(): UClass? = super.getSuperClass() @@ -67,7 +67,7 @@ class GrUMethod(val grElement: GrMethod, override val uastAnchor: UIdentifier get() = UIdentifier(grElement.nameIdentifierGroovy, this) - override val annotations: List by lazy { grAnnotations(grElement.modifierList, this) } + override val uAnnotations: List by lazy { grAnnotations(grElement.modifierList, this) } override fun getBody(): PsiCodeBlock? = null @@ -94,7 +94,7 @@ class GrUParameter(val grElement: GrParameter, override val uastAnchor: UIdentifier get() = UIdentifier(grElement.nameIdentifierGroovy, this) - override val annotations: List by lazy { grAnnotations(grElement.modifierList, this) } + override val uAnnotations: List by lazy { grAnnotations(grElement.modifierList, this) } override fun getInitializer(): PsiExpression? = grElement.initializer diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUFile.kt b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUFile.kt index da6152721efc..359886c98a16 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUFile.kt +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUFile.kt @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.psi.uast import com.intellij.psi.PsiComment @@ -19,7 +17,7 @@ class GrUFile(override val sourcePsi: GroovyFile, override val languagePlugin: U override val imports: List = emptyList() // not implemented - override val annotations: List + override val uAnnotations: List get() = sourcePsi.packageDefinition?.annotationList?.annotations?.map { GrUAnnotation(it, { this }) } ?: emptyList() override val classes: List by lazy { sourcePsi.classes.mapNotNull { (it as? GrTypeDefinition)?.let { GrUClass(it, { this }) } } } diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUReferenceExpression.kt b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUReferenceExpression.kt index 568b807e4e25..7d07bf5b8fc0 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUReferenceExpression.kt +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GrUReferenceExpression.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.psi.uast import com.intellij.psi.PsiElement @@ -23,7 +23,7 @@ class GrUReferenceExpression( override val uastParent: UElement? by lazy(parentProvider) - override val annotations: List = emptyList() + override val uAnnotations: List = emptyList() override fun resolve(): PsiElement? = sourcePsi.resolve() override fun multiResolve(): Iterable = diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GroovyUastPlugin.kt b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GroovyUastPlugin.kt index 11792ed9ee3f..49bb69bb4f67 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GroovyUastPlugin.kt +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/uast/GroovyUastPlugin.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.psi.uast import com.intellij.lang.Language @@ -70,7 +70,7 @@ class GrULiteral(val grElement: GrLiteral, val parentProvider: () -> UElement?) override fun evaluate(): Any? = value override val uastParent: UElement? by lazy(parentProvider) override val psi: PsiElement? = grElement - override val annotations: List = emptyList() //not implemented + override val uAnnotations: List = emptyList() //not implemented override val isString: Boolean get() = super.isString override val psiLanguageInjectionHost: PsiLanguageInjectionHost @@ -86,7 +86,7 @@ class GrUNamedExpression(val grElement: GrAnnotationNameValuePair, val parentPro override val uastParent: UElement? by lazy(parentProvider) override val psi: GrAnnotationNameValuePair = grElement - override val annotations: List = emptyList() //not implemented + override val uAnnotations: List = emptyList() //not implemented override fun equals(other: Any?): Boolean { if (other !is GrUNamedExpression) return false @@ -131,6 +131,6 @@ class GrUnknownUExpression(override val psi: PsiElement?, override val uastParen override fun asLogString(): String = "GrUnknownUExpression(grElement)" - override val annotations: List = emptyList() //not implemented + override val uAnnotations: List = emptyList() //not implemented } \ No newline at end of file diff --git a/uast/uast-common/src/org/jetbrains/uast/baseElements/UExpression.kt b/uast/uast-common/src/org/jetbrains/uast/baseElements/UExpression.kt index a2bbcf1ebc50..70efac0bfbf9 100644 --- a/uast/uast-common/src/org/jetbrains/uast/baseElements/UExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/baseElements/UExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiElement @@ -47,10 +33,23 @@ interface UExpression : UElement, UAnnotated { * Represents an annotated element. */ interface UAnnotated : UElement { + + @Deprecated( + message = "Will be removed to avoid clash with com.intellij.psi.PsiModifierListOwner#getAnnotations", + replaceWith = ReplaceWith(expression = "uAnnotations"), + level = DeprecationLevel.WARNING + ) + @JvmDefault + val annotations: List + get() = uAnnotations + /** * Returns the list of annotations applied to the current element. */ - val annotations: List + @Suppress("DEPRECATION") + @JvmDefault + val uAnnotations: List + get() = annotations /** * Looks up for annotation element using the annotation qualified name. @@ -58,7 +57,7 @@ interface UAnnotated : UElement { * @param fqName the qualified name to search * @return the first annotation element with the specified qualified name, or null if there is no annotation with such name. */ - fun findAnnotation(fqName: String): UAnnotation? = annotations.firstOrNull { it.qualifiedName == fqName } + fun findAnnotation(fqName: String): UAnnotation? = uAnnotations.firstOrNull { it.qualifiedName == fqName } } /** @@ -86,7 +85,7 @@ interface ULabeled : UElement { */ open class UastEmptyExpression(override val uastParent: UElement?) : UExpression { - override val annotations: List + override val uAnnotations: List get() = emptyList() override val psi: PsiElement? diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UDoWhileExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UDoWhileExpression.kt index 414c51b77bb7..d82695b6e65b 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UDoWhileExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UDoWhileExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -47,7 +33,7 @@ interface UDoWhileExpression : ULoopExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitDoWhileExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) condition.accept(visitor) body.accept(visitor) visitor.afterVisitDoWhileExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForEachExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForEachExpression.kt index 4279879aceaa..895e26b5e1ec 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForEachExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForEachExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -47,7 +33,7 @@ interface UForEachExpression : ULoopExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitForEachExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) iteratedValue.accept(visitor) body.accept(visitor) visitor.afterVisitForEachExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForExpression.kt index f713f1b0758f..538f2fd4480b 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UForExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -52,7 +38,7 @@ interface UForExpression : ULoopExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitForExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) declaration?.accept(visitor) condition?.accept(visitor) update?.accept(visitor) diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UIfExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UIfExpression.kt index 2386d4b38ac7..456d3966e174 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UIfExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UIfExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -68,7 +54,7 @@ interface UIfExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitIfExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) condition.accept(visitor) thenExpression?.accept(visitor) elseExpression?.accept(visitor) diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/USwitchExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/USwitchExpression.kt index 21e4dd4cb51d..8bc1740d59c1 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/USwitchExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/USwitchExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -51,7 +37,7 @@ interface USwitchExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitSwitchExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expression?.accept(visitor) body.accept(visitor) visitor.afterVisitSwitchExpression(this) @@ -83,7 +69,7 @@ interface USwitchClauseExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitSwitchClauseExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) caseValues.acceptList(visitor) visitor.afterVisitSwitchClauseExpression(this) } @@ -110,7 +96,7 @@ interface USwitchClauseExpressionWithBody : USwitchClauseExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitSwitchClauseExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) caseValues.acceptList(visitor) body.accept(visitor) visitor.afterVisitSwitchClauseExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UTryExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UTryExpression.kt index 84a4bde3da4e..592c927ea7e1 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UTryExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UTryExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiType @@ -79,7 +65,7 @@ interface UTryExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitTryExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) resourceVariables.acceptList(visitor) tryClause.accept(visitor) catchClauses.acceptList(visitor) diff --git a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UWhileExpression.kt b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UWhileExpression.kt index 60c519d59f68..2f5ab0ed0b81 100644 --- a/uast/uast-common/src/org/jetbrains/uast/controlStructures/UWhileExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/controlStructures/UWhileExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -42,7 +28,7 @@ interface UWhileExpression : ULoopExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitWhileExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) condition.accept(visitor) body.accept(visitor) visitor.afterVisitWhileExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/declarations/UClass.kt b/uast/uast-common/src/org/jetbrains/uast/declarations/UClass.kt index 40e55d390ec5..cef00af76714 100644 --- a/uast/uast-common/src/org/jetbrains/uast/declarations/UClass.kt +++ b/uast/uast-common/src/org/jetbrains/uast/declarations/UClass.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiAnonymousClass @@ -69,7 +55,7 @@ interface UClass : UDeclaration, PsiClass { override fun accept(visitor: UastVisitor) { if (visitor.visitClass(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) uastDeclarations.acceptList(visitor) visitor.afterVisitClass(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/declarations/UClassInitializer.kt b/uast/uast-common/src/org/jetbrains/uast/declarations/UClassInitializer.kt index 4ee614e52c30..e4a9aa7c090b 100644 --- a/uast/uast-common/src/org/jetbrains/uast/declarations/UClassInitializer.kt +++ b/uast/uast-common/src/org/jetbrains/uast/declarations/UClassInitializer.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiClassInitializer @@ -41,7 +27,7 @@ interface UClassInitializer : UDeclaration, PsiClassInitializer { override fun accept(visitor: UastVisitor) { if (visitor.visitInitializer(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) uastBody.accept(visitor) visitor.afterVisitInitializer(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/declarations/UFile.kt b/uast/uast-common/src/org/jetbrains/uast/declarations/UFile.kt index 0a942e13aa72..921d5ffbca82 100644 --- a/uast/uast-common/src/org/jetbrains/uast/declarations/UFile.kt +++ b/uast/uast-common/src/org/jetbrains/uast/declarations/UFile.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiElement @@ -65,8 +51,8 @@ interface UFile : UElement, UAnnotated { override fun asLogString(): String = log("package = $packageName") override fun asRenderString(): String = buildString { - if (annotations.isNotEmpty()) { - annotations.joinTo(buffer = this, separator = "\n", postfix = "\n", transform = UAnnotation::asRenderString) + if (uAnnotations.isNotEmpty()) { + uAnnotations.joinTo(buffer = this, separator = "\n", postfix = "\n", transform = UAnnotation::asRenderString) } val packageName = this@UFile.packageName @@ -92,7 +78,7 @@ interface UFile : UElement, UAnnotated { override fun accept(visitor: UastVisitor) { if (visitor.visitFile(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) imports.acceptList(visitor) classes.acceptList(visitor) visitor.afterVisitFile(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/declarations/UMethod.kt b/uast/uast-common/src/org/jetbrains/uast/declarations/UMethod.kt index cc296f24126a..025e1187e1e0 100644 --- a/uast/uast-common/src/org/jetbrains/uast/declarations/UMethod.kt +++ b/uast/uast-common/src/org/jetbrains/uast/declarations/UMethod.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.* @@ -50,23 +36,23 @@ interface UMethod : UDeclaration, PsiMethod { override fun accept(visitor: UastVisitor) { if (visitor.visitMethod(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) uastParameters.acceptList(visitor) uastBody?.accept(visitor) visitor.afterVisitMethod(this) } override fun asRenderString(): String = buildString { - if (annotations.isNotEmpty()) { - annotations.joinTo(buffer = this, separator = "\n", postfix = "\n", transform = UAnnotation::asRenderString) + if (uAnnotations.isNotEmpty()) { + uAnnotations.joinTo(buffer = this, separator = "\n", postfix = "\n", transform = UAnnotation::asRenderString) } append(javaPsi.renderModifiers()) append("fun ").append(name) uastParameters.joinTo(this, prefix = "(", postfix = ")") { parameter -> - val annotationsText = if (parameter.annotations.isNotEmpty()) - parameter.annotations.joinToString(separator = " ", postfix = " ") { it.asRenderString() } + val annotationsText = if (parameter.uAnnotations.isNotEmpty()) + parameter.uAnnotations.joinToString(separator = " ", postfix = " ") { it.asRenderString() } else "" annotationsText + parameter.name + ": " + parameter.type.canonicalText @@ -113,7 +99,7 @@ interface UAnnotationMethod : UMethod, PsiAnnotationMethod { override fun accept(visitor: UastVisitor) { if (visitor.visitMethod(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) uastParameters.acceptList(visitor) uastBody?.accept(visitor) uastDefaultValue?.accept(visitor) diff --git a/uast/uast-common/src/org/jetbrains/uast/declarations/UVariable.kt b/uast/uast-common/src/org/jetbrains/uast/declarations/UVariable.kt index 988d74e0089f..658ac0c5515d 100644 --- a/uast/uast-common/src/org/jetbrains/uast/declarations/UVariable.kt +++ b/uast/uast-common/src/org/jetbrains/uast/declarations/UVariable.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.* @@ -60,8 +46,8 @@ interface UVariable : UDeclaration, PsiVariable { override fun asLogString(): String = log("name = $name") override fun asRenderString(): String = buildString { - if (annotations.isNotEmpty()) { - annotations.joinTo(this, separator = " ", postfix = " ") { it.asRenderString() } + if (uAnnotations.isNotEmpty()) { + uAnnotations.joinTo(this, separator = " ", postfix = " ") { it.asRenderString() } } append(javaPsiInternal.renderModifiers()) append("var ").append(javaPsiInternal.name).append(": ").append(javaPsiInternal.type.getCanonicalText(false)) @@ -74,7 +60,7 @@ interface UVariableEx : UVariable, UDeclarationEx { } private fun UVariable.visitContents(visitor: UastVisitor) { - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) uastInitializer?.accept(visitor) } @@ -141,7 +127,7 @@ interface UEnumConstant : UField, UCallExpression, PsiEnumConstant { override fun accept(visitor: UastVisitor) { if (visitor.visitEnumConstant(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) methodIdentifier?.accept(visitor) classReference?.accept(visitor) valueArguments.acceptList(visitor) @@ -153,8 +139,8 @@ interface UEnumConstant : UField, UCallExpression, PsiEnumConstant { visitor.visitEnumConstantExpression(this, data) override fun asRenderString(): String = buildString { - if (annotations.isNotEmpty()) { - annotations.joinTo(this, separator = " ", postfix = " ", transform = UAnnotation::asRenderString) + if (uAnnotations.isNotEmpty()) { + uAnnotations.joinTo(this, separator = " ", postfix = " ", transform = UAnnotation::asRenderString) } append(name) if (valueArguments.isNotEmpty()) { diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UArrayAccessExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UArrayAccessExpression.kt index 71dd79405652..85ce58fc24c2 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UArrayAccessExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UArrayAccessExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -36,7 +22,7 @@ interface UArrayAccessExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitArrayAccessExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) receiver.accept(visitor) indices.acceptList(visitor) visitor.afterVisitArrayAccessExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpression.kt index 89f58aa4c068..c5d8467c858c 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiMethod @@ -52,7 +38,7 @@ interface UBinaryExpression : UPolyadicExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitBinaryExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) leftOperand.accept(visitor) rightOperand.accept(visitor) visitor.afterVisitBinaryExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpressionWithType.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpressionWithType.kt index 8496d59d8816..9444cb7ac30d 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpressionWithType.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UBinaryExpressionWithType.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -52,7 +38,7 @@ interface UBinaryExpressionWithType : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitBinaryExpressionWithType(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) operand.accept(visitor) typeReference?.accept(visitor) visitor.afterVisitBinaryExpressionWithType(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UBlockExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UBlockExpression.kt index 60ed0131cc5d..610250455457 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UBlockExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UBlockExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -31,7 +17,7 @@ interface UBlockExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitBlockExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expressions.acceptList(visitor) visitor.afterVisitBlockExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UBreakExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UBreakExpression.kt index 935fe204f433..c6251c077d35 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UBreakExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UBreakExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -28,7 +14,7 @@ interface UBreakExpression : UJumpExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitBreakExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitBreakExpression(this) } @@ -46,7 +32,7 @@ interface UBreakWithValueExpression : UBreakExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitBreakExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) valueExpression?.accept(visitor) visitor.afterVisitBreakExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UCallExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UCallExpression.kt index bc95b277e0c0..3e32083e6109 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UCallExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UCallExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -97,7 +83,7 @@ interface UCallExpression : UExpression, UResolvable { override fun accept(visitor: UastVisitor) { if (visitor.visitCallExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) methodIdentifier?.accept(visitor) classReference?.accept(visitor) valueArguments.acceptList(visitor) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UCallableReferenceExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UCallableReferenceExpression.kt index eae529e495c7..8b5ca2d66005 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UCallableReferenceExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UCallableReferenceExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -45,7 +31,7 @@ interface UCallableReferenceExpression : UReferenceExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitCallableReferenceExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) qualifierExpression?.accept(visitor) visitor.afterVisitCallableReferenceExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UClassLiteralExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UClassLiteralExpression.kt index 6ec54f6d0e48..b7996fe2701d 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UClassLiteralExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UClassLiteralExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -43,7 +29,7 @@ interface UClassLiteralExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitClassLiteralExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expression?.accept(visitor) visitor.afterVisitClassLiteralExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UContinueExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UContinueExpression.kt index 60e38eba65e9..3805f6166832 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UContinueExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UContinueExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -28,7 +14,7 @@ interface UContinueExpression : UJumpExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitContinueExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitContinueExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UDeclarationsExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UDeclarationsExpression.kt index 9f32011c750d..1fe7d36a44f9 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UDeclarationsExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UDeclarationsExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -32,7 +18,7 @@ interface UDeclarationsExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitDeclarationsExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) declarations.acceptList(visitor) visitor.afterVisitDeclarationsExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UExpressionList.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UExpressionList.kt index b71d8ed7dad4..ff8349da1044 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UExpressionList.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UExpressionList.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -36,7 +22,7 @@ interface UExpressionList : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitExpressionList(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expressions.acceptList(visitor) visitor.afterVisitExpressionList(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/ULabeledExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/ULabeledExpression.kt index fc1460f33796..985ccff16e32 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/ULabeledExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/ULabeledExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -36,7 +22,7 @@ interface ULabeledExpression : UExpression, ULabeled { override fun accept(visitor: UastVisitor) { if (visitor.visitLabeledExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expression.accept(visitor) visitor.afterVisitLabeledExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/ULambdaExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/ULambdaExpression.kt index 791e88a9f60b..59a33c92aecd 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/ULambdaExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/ULambdaExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiType @@ -42,7 +28,7 @@ interface ULambdaExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitLambdaExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) valueParameters.acceptList(visitor) body.accept(visitor) visitor.afterVisitLambdaExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/ULiteralExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/ULiteralExpression.kt index bb0cfe5b0d7c..4bb124f8cf69 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/ULiteralExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/ULiteralExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -50,7 +36,7 @@ interface ULiteralExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitLiteralExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitLiteralExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UNamedExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UNamedExpression.kt index 324cf20b75ad..772211f64879 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UNamedExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UNamedExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -25,7 +11,7 @@ interface UNamedExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitElement(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expression.accept(visitor) visitor.afterVisitElement(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UObjectLiteralExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UObjectLiteralExpression.kt index eb778bee5893..7f10eafef532 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UObjectLiteralExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UObjectLiteralExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiType @@ -51,7 +37,7 @@ interface UObjectLiteralExpression : UCallExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitObjectLiteralExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) valueArguments.acceptList(visitor) declaration.accept(visitor) visitor.afterVisitObjectLiteralExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UParenthesizedExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UParenthesizedExpression.kt index e9bee7235bc9..4c747142e42d 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UParenthesizedExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UParenthesizedExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -31,7 +17,7 @@ interface UParenthesizedExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitParenthesizedExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) expression.accept(visitor) visitor.afterVisitParenthesizedExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UPolyadicExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UPolyadicExpression.kt index 66704044fd22..1e09830e9942 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UPolyadicExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UPolyadicExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -38,7 +24,7 @@ interface UPolyadicExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitPolyadicExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) operands.acceptList(visitor) visitor.afterVisitPolyadicExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UQualifiedReferenceExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UQualifiedReferenceExpression.kt index 6f2ee0bca4c6..8f690950f788 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UQualifiedReferenceExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UQualifiedReferenceExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -43,7 +29,7 @@ interface UQualifiedReferenceExpression : UReferenceExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitQualifiedReferenceExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) receiver.accept(visitor) selector.accept(visitor) visitor.afterVisitQualifiedReferenceExpression(this) diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UReturnExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UReturnExpression.kt index d8ef3090b4d4..5cdc1985bfd1 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UReturnExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UReturnExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -32,7 +18,7 @@ interface UReturnExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitReturnExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) returnExpression?.accept(visitor) visitor.afterVisitReturnExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/USimpleNameReferenceExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/USimpleNameReferenceExpression.kt index a2f89c7bc2c7..c5136c4a0761 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/USimpleNameReferenceExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/USimpleNameReferenceExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -31,7 +17,7 @@ interface USimpleNameReferenceExpression : UReferenceExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitSimpleNameReferenceExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitSimpleNameReferenceExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/USuperExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/USuperExpression.kt index 8b3da75f9f03..8936b29b7208 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/USuperExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/USuperExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -31,7 +17,7 @@ interface USuperExpression : UInstanceExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitSuperExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitSuperExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UThisExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UThisExpression.kt index 2d4f56c56da9..209dcfcd74dd 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UThisExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UThisExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import org.jetbrains.uast.internal.acceptList @@ -31,7 +17,7 @@ interface UThisExpression : UInstanceExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitThisExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitThisExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UThrowExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UThrowExpression.kt index b5bb7b8335f5..a3d51aec0913 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UThrowExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UThrowExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast @@ -32,7 +18,7 @@ interface UThrowExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitThrowExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) thrownExpression.accept(visitor) visitor.afterVisitThrowExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UTypeReferenceExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UTypeReferenceExpression.kt index dee77857e465..1499dfde170d 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UTypeReferenceExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UTypeReferenceExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiType @@ -35,7 +21,7 @@ interface UTypeReferenceExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitTypeReferenceExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) visitor.afterVisitTypeReferenceExpression(this) } diff --git a/uast/uast-common/src/org/jetbrains/uast/expressions/UUnaryExpression.kt b/uast/uast-common/src/org/jetbrains/uast/expressions/UUnaryExpression.kt index 5d0c9c66a83b..5bb40812021c 100644 --- a/uast/uast-common/src/org/jetbrains/uast/expressions/UUnaryExpression.kt +++ b/uast/uast-common/src/org/jetbrains/uast/expressions/UUnaryExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast import com.intellij.psi.PsiMethod @@ -46,7 +32,7 @@ interface UUnaryExpression : UExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitUnaryExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) operand.accept(visitor) visitor.afterVisitUnaryExpression(this) } @@ -60,7 +46,7 @@ interface UPrefixExpression : UUnaryExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitPrefixExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) operand.accept(visitor) visitor.afterVisitPrefixExpression(this) } @@ -78,7 +64,7 @@ interface UPostfixExpression : UUnaryExpression { override fun accept(visitor: UastVisitor) { if (visitor.visitPostfixExpression(this)) return - annotations.acceptList(visitor) + uAnnotations.acceptList(visitor) operand.accept(visitor) visitor.afterVisitPostfixExpression(this) } diff --git a/uast/uast-java/src/org/jetbrains/uast/java/JavaAbstractUElement.kt b/uast/uast-java/src/org/jetbrains/uast/java/JavaAbstractUElement.kt index 87a8c1ff7e37..f626107d996b 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/JavaAbstractUElement.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/JavaAbstractUElement.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java @@ -129,7 +115,7 @@ abstract class JavaAbstractUExpression(givenParent: UElement?) : JavaAbstractUEl return JavaPsiFacade.getInstance(project).constantEvaluationHelper.computeConstantExpression(sourcePsi) } - override val annotations: List + override val uAnnotations: List get() = emptyList() override fun getExpressionType(): PsiType? { diff --git a/uast/uast-java/src/org/jetbrains/uast/java/controlStructures/JavaUSwitchExpression.kt b/uast/uast-java/src/org/jetbrains/uast/java/controlStructures/JavaUSwitchExpression.kt index ef3f612da369..dbb9dea30386 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/controlStructures/JavaUSwitchExpression.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/controlStructures/JavaUSwitchExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java import com.intellij.psi.* @@ -170,7 +156,7 @@ internal class DummyUBreakExpression(val valueExpressionPsi: PsiExpression, get() = null override val label: String? get() = null - override val annotations: List + override val uAnnotations: List get() = emptyList() override val valueExpression: UExpression? by lazy { JavaConverter.convertExpression(valueExpressionPsi, this) } @@ -190,7 +176,7 @@ internal class DummyUBreakExpression(val valueExpressionPsi: PsiExpression, class JavaUDefaultCaseExpression(override val sourcePsi: PsiElement?, givenParent: UElement?) : JavaAbstractUExpression(givenParent), UElement { - override val annotations: List + override val uAnnotations: List get() = emptyList() override fun asLogString(): String = "UDefaultCaseExpression" diff --git a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClass.kt b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClass.kt index bfe749b8f0de..2dfd31786328 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClass.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClass.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java @@ -50,7 +36,7 @@ abstract class AbstractJavaUClass(givenParent: UElement?) : JavaAbstractUElement override val uastAnchor: UIdentifier? get() = UIdentifier(javaPsi.nameIdentifier, this) - override val annotations: List + override val uAnnotations: List get() = javaPsi.annotations.map { JavaUAnnotation(it, this) } override fun equals(other: Any?): Boolean = other is AbstractJavaUClass && javaPsi == other.javaPsi diff --git a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClassInitializer.kt b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClassInitializer.kt index 6c65be671c0c..6f7baef3fb84 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClassInitializer.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUClassInitializer.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java @@ -38,7 +24,7 @@ class JavaUClassInitializer( getLanguagePlugin().convertElement(sourcePsi.body, this, null) as? UExpression ?: UastEmptyExpression(this) } - override val annotations: List by lz { sourcePsi.annotations.map { JavaUAnnotation(it, this) } } + override val uAnnotations: List by lz { sourcePsi.annotations.map { JavaUAnnotation(it, this) } } override fun equals(other: Any?): Boolean = this === other override fun hashCode(): Int = sourcePsi.hashCode() diff --git a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUFile.kt b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUFile.kt index 0bcd639c549d..6c5a7e219541 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUFile.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUFile.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java import com.intellij.psi.PsiComment @@ -29,7 +15,7 @@ class JavaUFile(override val sourcePsi: PsiJavaFile, override val languagePlugin sourcePsi.importList?.allImportStatements?.map { JavaUImportStatement(it, this) } ?: listOf() } - override val annotations: List + override val uAnnotations: List get() = sourcePsi.packageStatement?.annotationList?.annotations?.map { JavaUAnnotation(it, this) } ?: emptyList() override val classes: List by lz { sourcePsi.classes.map { JavaUClass.create(it, this) } } diff --git a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUMethod.kt b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUMethod.kt index ab8eab63df98..696018f0f0d4 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUMethod.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUMethod.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java @@ -25,7 +25,7 @@ open class JavaUMethod( getLanguagePlugin().convertElement(body, this) as? UExpression } - override val annotations: List by lz { sourcePsi.annotations.map { JavaUAnnotation(it, this) } } + override val uAnnotations: List by lz { sourcePsi.annotations.map { JavaUAnnotation(it, this) } } override val uastParameters: List by lz { sourcePsi.parameterList.parameters.map { JavaUParameter(it, this) } diff --git a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUVariable.kt b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUVariable.kt index 00ab2abe7786..04d5ad7dc0b3 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUVariable.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/declarations/JavaUVariable.kt @@ -1,18 +1,4 @@ -/* -* Copyright 2000-2017 JetBrains s.r.o. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java @@ -35,7 +21,7 @@ abstract class AbstractJavaUVariable(givenParent: UElement?) : JavaAbstractUElem getLanguagePlugin().convertElement(initializer, this) as? UExpression } - override val annotations: List by lz { javaPsi.annotations.map { JavaUAnnotation(it, this) } } + override val uAnnotations: List by lz { javaPsi.annotations.map { JavaUAnnotation(it, this) } } override val typeReference: UTypeReferenceExpression? by lz { getLanguagePlugin().convertOpt(javaPsi.typeElement, this) } diff --git a/uast/uast-java/src/org/jetbrains/uast/java/expressions/JavaUDeclarationsExpression.kt b/uast/uast-java/src/org/jetbrains/uast/java/expressions/JavaUDeclarationsExpression.kt index d821168ef520..798d1aef486c 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/expressions/JavaUDeclarationsExpression.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/expressions/JavaUDeclarationsExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java import com.intellij.psi.PsiElement @@ -30,7 +16,7 @@ class JavaUDeclarationsExpression( this.declarations = declarations } - override val annotations: List + override val uAnnotations: List get() = emptyList() @Suppress("OverridingDeprecatedMember") diff --git a/uast/uast-java/src/org/jetbrains/uast/java/expressions/UnknownJavaExpression.kt b/uast/uast-java/src/org/jetbrains/uast/java/expressions/UnknownJavaExpression.kt index 5478514354c4..9cd1bb0b67df 100644 --- a/uast/uast-java/src/org/jetbrains/uast/java/expressions/UnknownJavaExpression.kt +++ b/uast/uast-java/src/org/jetbrains/uast/java/expressions/UnknownJavaExpression.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.uast.java import com.intellij.psi.PsiElement @@ -26,6 +12,6 @@ class UnknownJavaExpression( ) : JavaAbstractUElement(uastParent), UExpression, UElement { override fun asLogString(): String = "[!] " + UnknownJavaExpression::class.java.simpleName + " ($sourcePsi)" - override val annotations: List + override val uAnnotations: List get() = emptyList() } \ No newline at end of file