Rearrange JvmStdlibNames, delete old annotations
Delete unused constants Move constants related to abi to JvmAbi class Constants related to annotation names are now in JvmAnnotationNames Remove old annotation classes Deprecate JetClass and JetPackageClass name constants
This commit is contained in:
@@ -55,8 +55,8 @@ import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall;
|
||||
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant;
|
||||
import org.jetbrains.jet.lang.resolve.java.AsmTypeConstants;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAbi;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
@@ -222,9 +222,9 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
|
||||
ClassData data = new ClassData(createNameResolver(serializer.getNameTable()), classProto);
|
||||
|
||||
AnnotationVisitor av = v.getVisitor().visitAnnotation(JvmStdlibNames.KOTLIN_CLASS.getDescriptor(), true);
|
||||
av.visit(JvmStdlibNames.ABI_VERSION_NAME, JvmAbi.VERSION);
|
||||
AnnotationVisitor array = av.visitArray(JvmStdlibNames.KOTLIN_INFO_DATA_FIELD);
|
||||
AnnotationVisitor av = v.getVisitor().visitAnnotation(JvmAnnotationNames.KOTLIN_CLASS.getDescriptor(), true);
|
||||
av.visit(JvmAnnotationNames.ABI_VERSION_FIELD_NAME, JvmAbi.VERSION);
|
||||
AnnotationVisitor array = av.visitArray(JvmAnnotationNames.DATA_FIELD_NAME);
|
||||
for (String string : JavaProtoBufUtil.encodeBytes(data.toBytes())) {
|
||||
array.visit(null, string);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
|
||||
|
||||
{ // superinterfaces
|
||||
superInterfacesLinkedHashSet.add(JvmStdlibNames.JET_OBJECT.getInternalName());
|
||||
superInterfacesLinkedHashSet.add(JvmAbi.JET_OBJECT.getInternalName());
|
||||
|
||||
for (JetDelegationSpecifier specifier : myClass.getDelegationSpecifiers()) {
|
||||
JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
|
||||
|
||||
@@ -42,8 +42,8 @@ import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAbi;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmClassName;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.PackageClassUtils;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
@@ -145,9 +145,9 @@ public class NamespaceCodegen extends MemberCodegen {
|
||||
|
||||
PackageData data = new PackageData(createNameResolver(serializer.getNameTable()), packageProto);
|
||||
|
||||
AnnotationVisitor av = v.getClassBuilder().newAnnotation(JvmStdlibNames.KOTLIN_PACKAGE.getDescriptor(), true);
|
||||
av.visit(JvmStdlibNames.ABI_VERSION_NAME, JvmAbi.VERSION);
|
||||
AnnotationVisitor array = av.visitArray(JvmStdlibNames.KOTLIN_INFO_DATA_FIELD);
|
||||
AnnotationVisitor av = v.getClassBuilder().newAnnotation(JvmAnnotationNames.KOTLIN_PACKAGE.getDescriptor(), true);
|
||||
av.visit(JvmAnnotationNames.ABI_VERSION_FIELD_NAME, JvmAbi.VERSION);
|
||||
AnnotationVisitor array = av.visitArray(JvmAnnotationNames.DATA_FIELD_NAME);
|
||||
for (String string : JavaProtoBufUtil.encodeBytes(data.toBytes())) {
|
||||
array.visit(null, string);
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,14 +51,14 @@ public final class DescriptorResolverUtils {
|
||||
if (!PackageClassUtils.isPackageClassFqName(new FqName(psiClass.getQualifiedName()))) {
|
||||
return false;
|
||||
}
|
||||
return hasAnnotation(psiClass, JvmStdlibNames.KOTLIN_PACKAGE.getFqName());
|
||||
return hasAnnotation(psiClass, JvmAnnotationNames.KOTLIN_PACKAGE.getFqName());
|
||||
}
|
||||
|
||||
public static boolean isCompiledKotlinClass(@NotNull PsiClass psiClass) {
|
||||
if (!(psiClass instanceof ClsClassImpl)) {
|
||||
return false;
|
||||
}
|
||||
return hasAnnotation(psiClass, JvmStdlibNames.KOTLIN_CLASS.getFqName());
|
||||
return hasAnnotation(psiClass, JvmAnnotationNames.KOTLIN_CLASS.getFqName());
|
||||
}
|
||||
|
||||
public static boolean hasAnnotation(@NotNull PsiClass psiClass, @NotNull FqName annotationFqName) {
|
||||
|
||||
+2
-2
@@ -280,10 +280,10 @@ public class JavaTypeTransformer {
|
||||
if (!signatureTypeUsages.contains(originalTypeUsage)) {
|
||||
return originalTypeUsage;
|
||||
}
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAbi.JETBRAINS_MUTABLE_ANNOTATION.getFqName().asString()) != null) {
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAnnotationNames.JETBRAINS_MUTABLE_ANNOTATION.getFqName().asString()) != null) {
|
||||
return TypeUsage.MEMBER_SIGNATURE_COVARIANT;
|
||||
}
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAbi.JETBRAINS_READONLY_ANNOTATION.getFqName().asString()) != null) {
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAnnotationNames.JETBRAINS_READONLY_ANNOTATION.getFqName().asString()) != null) {
|
||||
return TypeUsage.MEMBER_SIGNATURE_CONTRAVARIANT;
|
||||
}
|
||||
return originalTypeUsage;
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
|
||||
public class JvmAbi {
|
||||
public final class JvmAbi {
|
||||
/**
|
||||
* This constant is used to identify binary format (class file) versions
|
||||
* If you change class file metadata format and/or naming conventions, please increase this number
|
||||
@@ -44,13 +44,7 @@ public class JvmAbi {
|
||||
public static final String INSTANCE_FIELD = "instance$";
|
||||
public static final String CLASS_OBJECT_FIELD = "object$";
|
||||
|
||||
public static final JvmClassName JETBRAINS_NOT_NULL_ANNOTATION =
|
||||
JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.annotations.NotNull");
|
||||
|
||||
public static final JvmClassName JETBRAINS_MUTABLE_ANNOTATION =
|
||||
JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.annotations.Mutable");
|
||||
public static final JvmClassName JETBRAINS_READONLY_ANNOTATION =
|
||||
JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.annotations.ReadOnly");
|
||||
public static final JvmClassName JET_OBJECT = JvmClassName.byFqNameWithoutInnerClasses("jet.JetObject");
|
||||
|
||||
public static boolean isClassObjectFqName(@NotNull FqName fqName) {
|
||||
return fqName.lastSegmentIs(Name.identifier(CLASS_OBJECT_CLASS_NAME));
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.java;
|
||||
|
||||
import jet.KotlinClass;
|
||||
import jet.KotlinPackage;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.rt.annotation.AssertInvisibleInResolver;
|
||||
|
||||
public final class JvmAnnotationNames {
|
||||
public static final JvmClassName KOTLIN_CLASS = JvmClassName.byClass(KotlinClass.class);
|
||||
|
||||
public static final JvmClassName KOTLIN_PACKAGE = JvmClassName.byClass(KotlinPackage.class);
|
||||
|
||||
public static final String ABI_VERSION_FIELD_NAME = "abiVersion";
|
||||
|
||||
public static final String DATA_FIELD_NAME = "data";
|
||||
@Deprecated
|
||||
public static final JvmClassName OLD_JET_CLASS_ANNOTATION = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetClass");
|
||||
@Deprecated
|
||||
public static final JvmClassName OLD_JET_PACKAGE_CLASS_ANNOTATION = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetPackageClass");
|
||||
|
||||
public static final JvmClassName ASSERT_INVISIBLE_IN_RESOLVER = JvmClassName.byClass(AssertInvisibleInResolver.class);
|
||||
|
||||
public static final JvmClassName KOTLIN_SIGNATURE = JvmClassName.byClass(KotlinSignature.class);
|
||||
|
||||
public static final String KOTLIN_SIGNATURE_VALUE_FIELD_NAME = "value";
|
||||
|
||||
public static final JvmClassName JETBRAINS_NOT_NULL_ANNOTATION = JvmClassName.byClass(NotNull.class);
|
||||
|
||||
public static final JvmClassName JETBRAINS_MUTABLE_ANNOTATION = JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.annotations.Mutable");
|
||||
|
||||
public static final JvmClassName JETBRAINS_READONLY_ANNOTATION = JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.annotations.ReadOnly");
|
||||
|
||||
private JvmAnnotationNames() {
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,11 @@ public class JvmClassName {
|
||||
return byFqNameWithoutInnerClasses(new FqName(fqName));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static JvmClassName byClass(@NotNull Class<?> klass) {
|
||||
return byFqNameWithoutInnerClasses(new FqName(klass.getCanonicalName()));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static JvmClassName bySignatureName(@NotNull String signatureName) {
|
||||
JvmClassName className = new JvmClassName(signatureNameToInternalName(signatureName));
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.java;
|
||||
|
||||
import jet.KotlinClass;
|
||||
import jet.KotlinPackage;
|
||||
import jet.runtime.typeinfo.JetConstructor;
|
||||
|
||||
public class JvmStdlibNames {
|
||||
|
||||
public static final JvmClassName JET_VALUE_PARAMETER = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetValueParameter");
|
||||
|
||||
public static final String JET_VALUE_PARAMETER_NAME_FIELD = "name";
|
||||
public static final String JET_VALUE_PARAMETER_HAS_DEFAULT_VALUE_FIELD = "hasDefaultValue";
|
||||
public static final String JET_VALUE_PARAMETER_TYPE_FIELD = "type";
|
||||
public static final String JET_VALUE_PARAMETER_RECEIVER_FIELD = "receiver";
|
||||
public static final String JET_VALUE_PARAMETER_VARARG = "vararg";
|
||||
|
||||
|
||||
public static final JvmClassName JET_TYPE_PARAMETER = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetTypeParameter");
|
||||
|
||||
|
||||
public static final JvmClassName JET_METHOD = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetMethod");
|
||||
|
||||
public static final String JET_FLAGS_FIELD = "flags";
|
||||
|
||||
public static final String JET_METHOD_RETURN_TYPE_FIELD = "returnType";
|
||||
public static final String JET_METHOD_TYPE_PARAMETERS_FIELD = "typeParameters";
|
||||
public static final String JET_METHOD_PROPERTY_TYPE_FIELD = "propertyType";
|
||||
|
||||
public static final int FLAGS_DEFAULT_VALUE = 0;
|
||||
|
||||
public static final int FLAG_PROPERTY_BIT = 1;
|
||||
public static final int FLAG_FORCE_OPEN_BIT = 1 << 1;
|
||||
public static final int FLAG_FORCE_FINAL_BIT = 1 << 2;
|
||||
public static final int FLAG_PRIVATE_BIT = 1 << 3;
|
||||
public static final int FLAG_INTERNAL_BIT = 1 << 4;
|
||||
public static final int FLAG_PROTECTED_BIT = 1 << 5;
|
||||
|
||||
// for method, three bits (one reserved)
|
||||
public static final int FLAG_METHOD_KIND_MASK = 7 << 6;
|
||||
public static final int FLAG_METHOD_KIND_DECLARATION = 0 << 6;
|
||||
public static final int FLAG_METHOD_KIND_FAKE_OVERRIDE = 1 << 6;
|
||||
public static final int FLAG_METHOD_KIND_DELEGATION = 2 << 6;
|
||||
public static final int FLAG_METHOD_KIND_SYNTHESIZED = 3 << 6;
|
||||
|
||||
public static final int FLAG_CLASS_KIND_MASK = 7 << 6;
|
||||
public static final int FLAG_CLASS_KIND_OBJECT = 1 << 6;
|
||||
|
||||
public static final JvmClassName JET_CONSTRUCTOR = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetConstructor");
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see JetConstructor#hidden()
|
||||
*/
|
||||
public static final String JET_CONSTRUCTOR_HIDDEN_FIELD = "hidden";
|
||||
|
||||
public static final JvmClassName KOTLIN_CLASS = JvmClassName.byFqNameWithoutInnerClasses(KotlinClass.class.getCanonicalName());
|
||||
|
||||
public static final JvmClassName KOTLIN_PACKAGE = JvmClassName.byFqNameWithoutInnerClasses(KotlinPackage.class.getCanonicalName());
|
||||
|
||||
public static final JvmClassName JET_CLASS = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetClass");
|
||||
|
||||
public static final JvmClassName JET_CLASS_OBJECT = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetClassObject");
|
||||
|
||||
public static final JvmClassName JET_PACKAGE_CLASS = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.JetPackageClass");
|
||||
|
||||
public static final String ABI_VERSION_NAME = "abiVersion";
|
||||
|
||||
public static final String JET_CLASS_SIGNATURE = "signature";
|
||||
|
||||
public static final JvmClassName JET_OBJECT = JvmClassName.byFqNameWithoutInnerClasses("jet.JetObject");
|
||||
|
||||
public static final JvmClassName ASSERT_INVISIBLE_IN_RESOLVER = JvmClassName.byFqNameWithoutInnerClasses("org.jetbrains.jet.rt.annotation.AssertInvisibleInResolver");
|
||||
|
||||
public static final JvmClassName KOTLIN_SIGNATURE = JvmClassName.byFqNameWithoutInnerClasses("jet.runtime.typeinfo.KotlinSignature");
|
||||
|
||||
public static final String KOTLIN_SIGNATURE_VALUE_METHOD = "value";
|
||||
|
||||
public static final String KOTLIN_INFO_DATA_FIELD = "data";
|
||||
|
||||
private JvmStdlibNames() {
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -106,7 +106,7 @@ public class PsiClassFinderImpl implements PsiClassFinder {
|
||||
|
||||
if (KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME.equals(qualifiedName.parent())) {
|
||||
PsiAnnotation assertInvisibleAnnotation = JavaAnnotationResolver.findOwnAnnotation(
|
||||
original, JvmStdlibNames.ASSERT_INVISIBLE_IN_RESOLVER.getFqName().asString());
|
||||
original, JvmAnnotationNames.ASSERT_INVISIBLE_IN_RESOLVER.getFqName().asString());
|
||||
|
||||
if (assertInvisibleAnnotation != null) {
|
||||
switch (runtimeClassesHandleMode) {
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import com.intellij.psi.PsiAnnotation;
|
||||
import com.intellij.psi.PsiModifierListOwner;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.resolver.JavaAnnotationResolver;
|
||||
|
||||
public class KotlinSignatureAnnotation extends PsiAnnotationWrapper {
|
||||
@@ -39,7 +39,7 @@ public class KotlinSignatureAnnotation extends PsiAnnotationWrapper {
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
signature = StringUtil.unescapeStringCharacters(getStringAttribute(JvmStdlibNames.KOTLIN_SIGNATURE_VALUE_METHOD, ""));
|
||||
signature = StringUtil.unescapeStringCharacters(getStringAttribute(JvmAnnotationNames.KOTLIN_SIGNATURE_VALUE_FIELD_NAME, ""));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -52,7 +52,7 @@ public class KotlinSignatureAnnotation extends PsiAnnotationWrapper {
|
||||
public static KotlinSignatureAnnotation get(PsiModifierListOwner psiModifierListOwner) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver
|
||||
.findAnnotationWithExternal(psiModifierListOwner, JvmStdlibNames.KOTLIN_SIGNATURE.getFqName().asString());
|
||||
.findAnnotationWithExternal(psiModifierListOwner, JvmAnnotationNames.KOTLIN_SIGNATURE.getFqName().asString());
|
||||
return annotation != null ? new KotlinSignatureAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -151,8 +151,8 @@ public class AnnotationDescriptorDeserializer implements AnnotationDeserializer
|
||||
|
||||
private static boolean ignoreAnnotation(@NotNull String desc) {
|
||||
// TODO: JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION ?
|
||||
return desc.equals(JvmStdlibNames.KOTLIN_CLASS.getDescriptor())
|
||||
|| desc.equals(JvmStdlibNames.KOTLIN_PACKAGE.getDescriptor())
|
||||
return desc.equals(JvmAnnotationNames.KOTLIN_CLASS.getDescriptor())
|
||||
|| desc.equals(JvmAnnotationNames.KOTLIN_PACKAGE.getDescriptor())
|
||||
|| desc.startsWith("Ljet/runtime/typeinfo/");
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -32,7 +32,7 @@ import org.jetbrains.jet.lang.descriptors.ClassOrNamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.java.AbiVersionUtil;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.storage.LockBasedStorageManager;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
@@ -222,15 +222,15 @@ public final class DeserializedDescriptorResolver {
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(final String desc, boolean visible) {
|
||||
if (!desc.equals(JvmStdlibNames.KOTLIN_CLASS.getDescriptor()) &&
|
||||
!desc.equals(JvmStdlibNames.KOTLIN_PACKAGE.getDescriptor())) {
|
||||
if (!desc.equals(JvmAnnotationNames.KOTLIN_CLASS.getDescriptor()) &&
|
||||
!desc.equals(JvmAnnotationNames.KOTLIN_PACKAGE.getDescriptor())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new AnnotationVisitor(Opcodes.ASM4) {
|
||||
@Override
|
||||
public void visit(String name, Object value) {
|
||||
if (name.equals(JvmStdlibNames.ABI_VERSION_NAME)) {
|
||||
if (name.equals(JvmAnnotationNames.ABI_VERSION_FIELD_NAME)) {
|
||||
version = (Integer) value;
|
||||
}
|
||||
else if (isAbiVersionCompatible(version)) {
|
||||
@@ -240,7 +240,7 @@ public final class DeserializedDescriptorResolver {
|
||||
|
||||
@Override
|
||||
public AnnotationVisitor visitArray(String name) {
|
||||
if (name.equals(JvmStdlibNames.KOTLIN_INFO_DATA_FIELD)) {
|
||||
if (name.equals(JvmAnnotationNames.DATA_FIELD_NAME)) {
|
||||
return stringArrayVisitor();
|
||||
}
|
||||
else if (isAbiVersionCompatible(version)) {
|
||||
|
||||
+3
-3
@@ -82,9 +82,9 @@ public final class JavaAnnotationResolver {
|
||||
|
||||
// Don't process internal jet annotations and jetbrains NotNull annotations
|
||||
if (qname.startsWith("jet.runtime.typeinfo.")
|
||||
|| qname.equals(JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString())
|
||||
|| qname.equals(JvmStdlibNames.KOTLIN_CLASS.getFqName().asString())
|
||||
|| qname.equals(JvmStdlibNames.KOTLIN_PACKAGE.getFqName().asString())
|
||||
|| qname.equals(JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString())
|
||||
|| qname.equals(JvmAnnotationNames.KOTLIN_CLASS.getFqName().asString())
|
||||
|| qname.equals(JvmAnnotationNames.KOTLIN_PACKAGE.getFqName().asString())
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
+1
-1
@@ -415,7 +415,7 @@ public final class JavaFunctionResolver {
|
||||
JetType transformedType = typeTransformer.transformToType(returnType, typeUsage, typeVariableResolver);
|
||||
|
||||
if (JavaAnnotationResolver
|
||||
.findAnnotationWithExternal(method.getPsiMethod(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) !=
|
||||
.findAnnotationWithExternal(method.getPsiMethod(), JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) !=
|
||||
null) {
|
||||
return TypeUtils.makeNullableAsSpecified(transformedType, false);
|
||||
}
|
||||
|
||||
+2
-1
@@ -202,7 +202,8 @@ public final class JavaNamespaceResolver {
|
||||
}
|
||||
|
||||
private static boolean isOldKotlinPackageClass(@NotNull PsiClass psiClass) {
|
||||
return DescriptorResolverUtils.hasAnnotation(psiClass, JvmStdlibNames.JET_PACKAGE_CLASS.getFqName());
|
||||
//noinspection deprecation
|
||||
return DescriptorResolverUtils.hasAnnotation(psiClass, JvmAnnotationNames.OLD_JET_PACKAGE_CLASS_ANNOTATION.getFqName());
|
||||
}
|
||||
|
||||
private void cache(@NotNull FqName fqName, @Nullable JetScope packageScope) {
|
||||
|
||||
+1
-1
@@ -255,7 +255,7 @@ public final class JavaPropertyResolver {
|
||||
|
||||
boolean hasNotNullAnnotation = JavaAnnotationResolver.findAnnotationWithExternal(
|
||||
field.getPsiField(),
|
||||
JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) != null;
|
||||
JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) != null;
|
||||
|
||||
if (hasNotNullAnnotation || isStaticFinalField(field)) {
|
||||
propertyType = TypeUtils.makeNotNullable(propertyType);
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ public final class JavaSupertypeResolver {
|
||||
if (resolved != null) {
|
||||
String qualifiedName = resolved.getQualifiedName();
|
||||
assert qualifiedName != null;
|
||||
if (JvmStdlibNames.JET_OBJECT.getFqName().equalsTo(qualifiedName)) {
|
||||
if (JvmAbi.JET_OBJECT.getFqName().equalsTo(qualifiedName)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -70,8 +70,8 @@ public final class JavaValueParameterResolver {
|
||||
}
|
||||
|
||||
JetType transformedType;
|
||||
PsiAnnotation notNullAnnotation = findAnnotationWithExternal(parameter,
|
||||
JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString());
|
||||
PsiAnnotation notNullAnnotation =
|
||||
findAnnotationWithExternal(parameter, JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString());
|
||||
if (notNullAnnotation != null) {
|
||||
transformedType = TypeUtils.makeNullableAsSpecified(outType, false);
|
||||
}
|
||||
|
||||
-3
@@ -29,9 +29,6 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.jet.jvm.compiler.LoadDescriptorUtil.compileKotlinToDirAndGetAnalyzeExhaust;
|
||||
|
||||
/**
|
||||
* @see WriteSignatureTest
|
||||
*/
|
||||
@SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors", "JUnitTestCaseWithNoTests"})
|
||||
public abstract class AbstractCompileJavaAgainstKotlinTest extends TestCaseWithTmpdir {
|
||||
protected void doTest(String ktFilePath) throws Exception {
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.TestJdkKind;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.CoreExternalAnnotationsManager;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.KotlinTestWithEnvironment;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
|
||||
@@ -158,9 +158,9 @@ public class IdeaJdkAnnotationsReflectedTest extends KotlinTestWithEnvironment {
|
||||
}
|
||||
|
||||
private enum AnnotationsKind {
|
||||
KOTLIN_SIGNATURE(JvmStdlibNames.KOTLIN_SIGNATURE.getFqName().asString()),
|
||||
KOTLIN_SIGNATURE(JvmAnnotationNames.KOTLIN_SIGNATURE.getFqName().asString()),
|
||||
NOT_NULL(AnnotationUtil.NOT_NULL),
|
||||
ANY(AnnotationUtil.NOT_NULL, JvmStdlibNames.KOTLIN_SIGNATURE.getFqName().asString());
|
||||
ANY(AnnotationUtil.NOT_NULL, JvmAnnotationNames.KOTLIN_SIGNATURE.getFqName().asString());
|
||||
|
||||
public final String[] annotationNames;
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@ import com.intellij.psi.impl.compiled.ClsElementImpl;
|
||||
import com.intellij.psi.impl.source.SourceTreeToPsiMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.resolver.JavaAnnotationResolver;
|
||||
|
||||
class KotlinSignatureUtil {
|
||||
static final String KOTLIN_SIGNATURE_ANNOTATION = JvmStdlibNames.KOTLIN_SIGNATURE.getFqName().asString();
|
||||
static final String KOTLIN_SIGNATURE_ANNOTATION = JvmAnnotationNames.KOTLIN_SIGNATURE.getFqName().asString();
|
||||
|
||||
private KotlinSignatureUtil() {
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.asm4.ClassReader;
|
||||
import org.jetbrains.asm4.ClassVisitor;
|
||||
import org.jetbrains.asm4.Opcodes;
|
||||
import org.jetbrains.jet.lang.resolve.java.AbiVersionUtil;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmStdlibNames;
|
||||
import org.jetbrains.jet.lang.resolve.java.JvmAnnotationNames;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -63,19 +63,20 @@ public class KotlinAbiVersionIndex extends ScalarIndexExtension<Integer> {
|
||||
try {
|
||||
ClassReader classReader = new ClassReader(inputData.getContent());
|
||||
classReader.accept(new ClassVisitor(Opcodes.ASM4) {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
|
||||
if (!JvmStdlibNames.JET_CLASS.getDescriptor().equals(desc) &&
|
||||
!JvmStdlibNames.JET_PACKAGE_CLASS.getDescriptor().equals(desc) &&
|
||||
!JvmStdlibNames.KOTLIN_CLASS.getDescriptor().equals(desc) &&
|
||||
!JvmStdlibNames.KOTLIN_PACKAGE.getDescriptor().equals(desc)) {
|
||||
if (!JvmAnnotationNames.OLD_JET_CLASS_ANNOTATION.getDescriptor().equals(desc) &&
|
||||
!JvmAnnotationNames.OLD_JET_PACKAGE_CLASS_ANNOTATION.getDescriptor().equals(desc) &&
|
||||
!JvmAnnotationNames.KOTLIN_CLASS.getDescriptor().equals(desc) &&
|
||||
!JvmAnnotationNames.KOTLIN_PACKAGE.getDescriptor().equals(desc)) {
|
||||
return null;
|
||||
}
|
||||
annotationPresent.set(true);
|
||||
return new AnnotationVisitor(Opcodes.ASM4) {
|
||||
@Override
|
||||
public void visit(String name, Object value) {
|
||||
if (JvmStdlibNames.ABI_VERSION_NAME.equals(name)) {
|
||||
if (JvmAnnotationNames.ABI_VERSION_FIELD_NAME.equals(name)) {
|
||||
if (value instanceof Integer) {
|
||||
Integer abiVersion = (Integer) value;
|
||||
result.put(abiVersion, null);
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JetClass {
|
||||
String signature();
|
||||
|
||||
/**
|
||||
* See JvmStdlibNames
|
||||
* @return flags for class
|
||||
*/
|
||||
int flags() default 0;
|
||||
|
||||
int abiVersion();
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
public @interface JetClassObject {
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
public @interface JetConstructor {
|
||||
/**
|
||||
* @deprecated Some time later all constructors will be visible
|
||||
*/
|
||||
boolean hidden() default false;
|
||||
|
||||
/**
|
||||
* See JvmStdlibNames
|
||||
* @return flags for method
|
||||
*/
|
||||
int flags() default 0;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation for method
|
||||
*
|
||||
* The fact of receiver presence must be deducted from presence of '$receiver' parameter
|
||||
*
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JetMethod {
|
||||
/**
|
||||
* See CallableMemberDescriptor.Kind
|
||||
* @deprecated See JvmStdlibNames - now kind is kept in flags
|
||||
* @return kind of this method
|
||||
*/
|
||||
int kind() default 0;
|
||||
|
||||
/**
|
||||
* See JvmStdlibNames
|
||||
* @return flags for method
|
||||
*/
|
||||
int flags() default 0;
|
||||
|
||||
/**
|
||||
* @deprecated not used any more
|
||||
* @return type projections or empty
|
||||
*/
|
||||
JetTypeProjection[] returnTypeProjections() default {};
|
||||
|
||||
/**
|
||||
* Serialized method type parameters.
|
||||
* @return
|
||||
*/
|
||||
String typeParameters() default "";
|
||||
|
||||
/**
|
||||
* @deprecated - now it kept in flags
|
||||
* @return is this type returnTypeNullable
|
||||
*/
|
||||
boolean nullableReturnType() default false;
|
||||
|
||||
/**
|
||||
* Return type type unless java type is correct Kotlin type.
|
||||
*/
|
||||
String returnType () default "";
|
||||
|
||||
/**
|
||||
* If this is property.
|
||||
* @return
|
||||
*/
|
||||
String propertyType() default "";
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JetPackageClass {
|
||||
int abiVersion();
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
|
||||
/**
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
public @interface JetTypeDescriptor{
|
||||
//
|
||||
// case of type parameter
|
||||
//
|
||||
String varName() default "";
|
||||
boolean reified () default true;
|
||||
int [] upperBounds() default {};
|
||||
|
||||
//
|
||||
// case of real type
|
||||
//
|
||||
Class javaClass() default Object.class;
|
||||
JetTypeProjection [] projections() default {};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation for parameters
|
||||
*
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
@Target({ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JetTypeParameter {
|
||||
/**
|
||||
* @return name of parameter
|
||||
*/
|
||||
String name() default "";
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JetTypeProjection {
|
||||
|
||||
/**
|
||||
* @return index of the class in the per class table of JetTypeDescriptor
|
||||
*/
|
||||
int typeDescriptorIndex();
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation for parameters
|
||||
*
|
||||
* @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
|
||||
*/
|
||||
@Target({ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JetValueParameter {
|
||||
/**
|
||||
* @return name of parameter
|
||||
*/
|
||||
String name ();
|
||||
|
||||
/**
|
||||
* @return if this parameter has default value
|
||||
*/
|
||||
boolean hasDefaultValue() default false;
|
||||
|
||||
/**
|
||||
* @return if this parameter is receiver
|
||||
*/
|
||||
boolean receiver() default false;
|
||||
|
||||
/**
|
||||
* @return type unless Java type is correct Kotlin type.
|
||||
*/
|
||||
String type() default "";
|
||||
|
||||
/**
|
||||
* @return <code>true</code> if this parameter is a vararg
|
||||
*
|
||||
* NOTE: a method may have a vararg parameter in Kotlin and not be marked as Opcodes.ACC_VARARGS, e.g.
|
||||
* fun foo(vararg x: Int, f: () -> Unit)
|
||||
*/
|
||||
boolean vararg() default false;
|
||||
}
|
||||
Reference in New Issue
Block a user