项目作者: zxy-c

项目描述 :
Declarations for converting Java and Kotlin classes to other languages
高级语言: Kotlin
项目地址: git://github.com/zxy-c/java-class-converter-plugins.git
创建时间: 2020-02-16T14:45:14Z
项目社区:https://github.com/zxy-c/java-class-converter-plugins

开源协议:Other

下载


java-converter-plugin for JetBrains

中文

Declarations for converting Java and Kotlin classes to other languages

Java Class to Typescript

Features

  • Convert Java and Kotlin Class to Typescript Interface
    • Generate files to specified directory
    • Generated files are saved in the clipboard
    • Generated code saved in clipboard

How to use

Right-click on the Java class or Kotlin class and select the sub-items in the Convert to Typescript Interface group as required

before

  1. /**
  2. * classDoc
  3. */
  4. public class JavaClass {
  5. private String demo;
  6. private int number1;
  7. private long number2;
  8. private final Boolean aBoolean = true;
  9. private List<String> list;
  10. private String[] array;
  11. private CustomClass customClass;
  12. private Map<String,CustomClass> map;
  13. private C c;
  14. /**
  15. * fieldDoc
  16. * fieldDoc
  17. */
  18. private float f;
  19. }
  20. enum C{
  21. /**
  22. * enumDoc
  23. * enumDoc
  24. */
  25. A,
  26. B
  27. }
  28. class CustomClass{
  29. private String a;
  30. }

after

  1. /*
  2. * classDoc
  3. */
  4. interface JavaClass {
  5. demo: string;
  6. number1: number;
  7. number2: number;
  8. readonly aBoolean: boolean;
  9. list: Array<string>;
  10. array: Array<string>;
  11. customClass: CustomClass;
  12. map: {
  13. [key: string]: CustomClass
  14. };
  15. c: C;
  16. /*
  17. * fieldDoc
  18. * fieldDoc
  19. */
  20. f: number;
  21. }
  22. interface CustomClass {
  23. a: string;
  24. }
  25. enum C {
  26. /*
  27. * enumDoc
  28. * enumDoc
  29. */
  30. A,
  31. B
  32. }

Java Class to Dart

Features

  • Convert Java and Kotlin Class to Dart Class
    • Generate files to specified directory
    • Generated files are saved in the clipboard
    • Generated code saved in clipboard

How to use

Right-click on the Java class or Kotlin class and select the sub-items in the Convert to Dart Class group as required

before

  1. /**
  2. * classDoc
  3. */
  4. public class JavaClass {
  5. private String demo;
  6. private int number1;
  7. private long number2;
  8. private final Boolean aBoolean = true;
  9. private List<String> list;
  10. private String[] array;
  11. private CustomClass customClass;
  12. private Map<String,CustomClass> map;
  13. private C c;
  14. /**
  15. * fieldDoc
  16. * fieldDoc
  17. */
  18. private float f;
  19. }
  20. enum C{
  21. /**
  22. * enumDoc
  23. * enumDoc
  24. */
  25. A,
  26. B
  27. }
  28. class CustomClass{
  29. private String a;
  30. }

after

  1. ///classDoc
  2. class JavaClass {
  3. String demo;
  4. int number1;
  5. int number2;
  6. final bool aBoolean;
  7. List<String> list;
  8. List<String> array;
  9. CustomClass customClass;
  10. Map<String, CustomClass> map;
  11. C c;
  12. ///fieldDoc
  13. ///fieldDoc
  14. int f;
  15. }
  16. class CustomClass {
  17. String a;
  18. }
  19. enum C {
  20. ///enumDoc
  21. ///enumDoc
  22. A,
  23. B
  24. }