Skip to content
Browse files

to kotlin

  • Loading branch information...
1 parent 1413e7b commit f578d60aaec2d9313b30cd8f218a2b971e6d5d97 @yole committed
View
46 src/org/jetbrains/jet/j2k/visitors/ClassVisitor.java
@@ -1,46 +0,0 @@
-/*
- * Copyright 2010-2012 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.j2k.visitors;
-
-import com.intellij.psi.JavaRecursiveElementVisitor;
-import com.intellij.psi.PsiClass;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author ignatov
- */
-public class ClassVisitor extends JavaRecursiveElementVisitor {
- private final Set<String> myClassIdentifiers;
-
- public ClassVisitor() {
- myClassIdentifiers = new HashSet<String>();
- }
-
- @NotNull
- public Set<String> getClassIdentifiers() {
- return new HashSet<String>(myClassIdentifiers);
- }
-
- @Override
- public void visitClass(@NotNull PsiClass aClass) {
- myClassIdentifiers.add(aClass.getQualifiedName());
- super.visitClass(aClass);
- }
-}
View
18 src/org/jetbrains/jet/j2k/visitors/ClassVisitor.kt
@@ -0,0 +1,18 @@
+package org.jetbrains.jet.j2k.visitors
+
+import com.intellij.psi.JavaRecursiveElementVisitor
+import com.intellij.psi.PsiClass
+import java.util.HashSet
+import java.util.Set
+
+public open class ClassVisitor(): JavaRecursiveElementVisitor() {
+ private val myClassIdentifiers: Set<String> = HashSet<String>()
+ public open fun getClassIdentifiers(): Set<String> {
+ return HashSet<String>(myClassIdentifiers)
+ }
+
+ public override fun visitClass(aClass: PsiClass?): Unit {
+ myClassIdentifiers.add(aClass?.getQualifiedName()!!)
+ super.visitClass(aClass)
+ }
+}

0 comments on commit f578d60

Please sign in to comment.
Something went wrong with that request. Please try again.