Skip to content

Instantly share code, notes, and snippets.

@edefazio
Created August 21, 2018 00:38
Show Gist options
  • Save edefazio/2a460bdd06367ac0fbdc215242addefb to your computer and use it in GitHub Desktop.
Save edefazio/2a460bdd06367ac0fbdc215242addefb to your computer and use it in GitHub Desktop.
JShell script for generating (and exporting) Java code using the draft API
/env --module-path C:\temp\jars\draft.jar;C:\temp\jars\javaparser-core-3.6.14.jar; --add-modules draft
import draft.java.*;
import draft.java.auto.*;
_class _c = _class.of("draftshell.gen.Point").fields("int x,y");
_autoDto.to(_c);
_out.to("C:\\temp", _c);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment