J2K: JetClassFileDecompiler.java converter
This commit is contained in:
+11
-24
@@ -14,33 +14,20 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.decompiler;
|
package org.jetbrains.kotlin.idea.decompiler
|
||||||
|
|
||||||
import com.intellij.openapi.vfs.VirtualFile;
|
import com.intellij.openapi.vfs.VirtualFile
|
||||||
import com.intellij.psi.FileViewProvider;
|
import com.intellij.psi.PsiManager
|
||||||
import com.intellij.psi.PsiManager;
|
import com.intellij.psi.compiled.ClassFileDecompilers
|
||||||
import com.intellij.psi.compiled.ClassFileDecompilers;
|
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.KotlinClsStubBuilder
|
||||||
import com.intellij.psi.compiled.ClsStubBuilder;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.kotlin.idea.decompiler.stubBuilder.KotlinClsStubBuilder;
|
|
||||||
|
|
||||||
public class JetClassFileDecompiler extends ClassFileDecompilers.Full {
|
public class JetClassFileDecompiler : ClassFileDecompilers.Full() {
|
||||||
private final ClsStubBuilder stubBuilder = new KotlinClsStubBuilder();
|
private val stubBuilder = KotlinClsStubBuilder()
|
||||||
|
|
||||||
@Override
|
override fun accepts(file: VirtualFile) = isKotlinJvmCompiledFile(file)
|
||||||
public boolean accepts(@NotNull VirtualFile file) {
|
|
||||||
return DecompilerPackage.isKotlinJvmCompiledFile(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
override fun getStubBuilder() = stubBuilder
|
||||||
@Override
|
|
||||||
public ClsStubBuilder getStubBuilder() {
|
|
||||||
return stubBuilder;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
override fun createFileViewProvider(file: VirtualFile, manager: PsiManager, physical: Boolean)
|
||||||
@Override
|
= JetClassFileViewProvider(manager, file, physical, isKotlinInternalCompiledFile(file))
|
||||||
public FileViewProvider createFileViewProvider(@NotNull VirtualFile file, @NotNull PsiManager manager, boolean physical) {
|
|
||||||
return new JetClassFileViewProvider(manager, file, physical, DecompilerPackage.isKotlinInternalCompiledFile(file));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user