initial changes

This commit is contained in:
pTalanov
2012-02-27 15:30:47 +04:00
parent e0cdbd6099
commit 8d6525f23f
396 changed files with 554 additions and 18555 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ class String() : Comparable<String>, CharSequence {
fun equals(other : Any?) : Boolean
}
class Throwable(message : String? = null, cause: Throwable? = null) {
open class Throwable(message : String? = null, cause: Throwable? = null) {
fun getMessage() : String?
fun getCause() : Throwable?
fun printStackTrace() : Unit
@@ -173,8 +173,8 @@ public class AnnotationResolver {
List<AnnotationDescriptor> result = Lists.newArrayList();
for (JetAnnotationEntry annotation : annotations) {
AnnotationDescriptor annotationDescriptor = new AnnotationDescriptor();
result.add(annotationDescriptor);
trace.record(BindingContext.ANNOTATION, annotation, annotationDescriptor);
// result.add(annotationDescriptor);
// trace.record(BindingContext.ANNOTATION, annotation, annotationDescriptor);
}
return result;
}
@@ -462,6 +462,11 @@ public class JetStandardLibrary {
return volatileType;
}
@NotNull
public Collection<ClassDescriptor> getArrayClasses() {
return primitiveTypeToArrayClass.values();
}
public final boolean isVolatile(PropertyDescriptor descriptor) {
List<AnnotationDescriptor> annotations = descriptor.getOriginal().getAnnotations();
if(annotations != null) {
@@ -16,10 +16,9 @@
package org.jetbrains.jet.plugin;
import org.jetbrains.jet.lang.psi.JetDeclaration;
import org.jetbrains.jet.lang.psi.JetNamedFunction;
import org.jetbrains.jet.lang.psi.JetParameter;
import org.jetbrains.jet.lang.psi.JetTypeReference;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.psi.*;
import java.util.List;
@@ -51,4 +50,23 @@ public class JetMainDetector {
}
return false;
}
@Nullable
public static String getMainClassFQName(@NotNull List<JetFile> files) {
JetFile file = getFileWithMain(files);
if (file == null) {
return null;
}
return JetPsiUtil.getFQName(file);
}
@Nullable
public static JetFile getFileWithMain(@NotNull List<JetFile> files) {
for (JetFile file : files) {
if (hasMain(file.getDeclarations())) {
return file;
}
}
return null;
}
}