1 Star 0 Fork 0

zxy/java-class-converter-plugins

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

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

/**
 * classDoc
 */
public class JavaClass {
    private String demo;
    private int number1;
    private long number2;
    private final Boolean aBoolean = true;
    private List<String> list;
    private String[] array;
    private CustomClass customClass;
    private Map<String,CustomClass> map;
    private C c;
    /**
     * fieldDoc
     * fieldDoc
     */
    private float f;
}

enum C{
    /**
     * enumDoc
     * enumDoc
     */
    A,
    B
}

class CustomClass{
    private String a;

}

after

/*
 * classDoc
 */
interface JavaClass {
    demo: string;
    number1: number;
    number2: number;
    readonly aBoolean: boolean;
    list: Array<string>;
    array: Array<string>;
    customClass: CustomClass;
    map: {
        [key: string]: CustomClass
    };
    c: C;
    /*
     * fieldDoc
     * fieldDoc
     */
    f: number;
}

interface CustomClass {
    a: string;
}

enum C {
    /*
     * enumDoc
     * enumDoc
     */
    A,
    B
}

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

/**
 * classDoc
 */
public class JavaClass {
    private String demo;
    private int number1;
    private long number2;
    private final Boolean aBoolean = true;
    private List<String> list;
    private String[] array;
    private CustomClass customClass;
    private Map<String,CustomClass> map;
    private C c;
    /**
     * fieldDoc
     * fieldDoc
     */
    private float f;
}

enum C{
    /**
     * enumDoc
     * enumDoc
     */
    A,
    B
}

class CustomClass{
    private String a;

}

after

///classDoc
class JavaClass {
  String demo;
  int number1;
  int number2;
  final bool aBoolean;
  List<String> list;
  List<String> array;
  CustomClass customClass;
  Map<String, CustomClass> map;
  C c;

  ///fieldDoc
  ///fieldDoc
  int f;
}

class CustomClass {
  String a;
}

enum C {
  ///enumDoc
  ///enumDoc
  A,
  B
}

Empty file

About

Cancel

Releases

No release

Contributors

All

Activities

can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Kotlin
1
https://gitee.com/zxy_c/java-class-converter-plugins.git
git@gitee.com:zxy_c/java-class-converter-plugins.git
zxy_c
java-class-converter-plugins
java-class-converter-plugins
master

Search