Generates Java BiDi module classes and their supporting POJOs from the flat binding-neutral bidi_schema.json produced by project_bidi_schema.mjs. Usage: BiDiGenerator
| 52 | * <p>Usage: {@code BiDiGenerator <schema.json> <output.srcjar>} |
| 53 | */ |
| 54 | public class BiDiGenerator { |
| 55 | |
| 56 | private static final String BASE_PKG = "org.openqa.selenium.bidi"; |
| 57 | |
| 58 | // Java reserved words that cannot appear as method names; append "_" to escape. |
| 59 | private static final Set<String> JAVA_RESERVED = |
| 60 | new java.util.HashSet<>( |
| 61 | java.util.Arrays.asList( |
| 62 | "abstract", |
| 63 | "assert", |
| 64 | "boolean", |
| 65 | "break", |
| 66 | "byte", |
| 67 | "case", |
| 68 | "catch", |
| 69 | "char", |
| 70 | "class", |
| 71 | "const", |
| 72 | "continue", |
| 73 | "default", |
| 74 | "do", |
| 75 | "double", |
| 76 | "else", |
| 77 | "enum", |
| 78 | "extends", |
| 79 | "final", |
| 80 | "finally", |
| 81 | "float", |
| 82 | "for", |
| 83 | "goto", |
| 84 | "if", |
| 85 | "implements", |
| 86 | "import", |
| 87 | "instanceof", |
| 88 | "int", |
| 89 | "interface", |
| 90 | "long", |
| 91 | "native", |
| 92 | "new", |
| 93 | "package", |
| 94 | "private", |
| 95 | "protected", |
| 96 | "public", |
| 97 | "return", |
| 98 | "short", |
| 99 | "static", |
| 100 | "strictfp", |
| 101 | "super", |
| 102 | "switch", |
| 103 | "synchronized", |
| 104 | "this", |
| 105 | "throw", |
| 106 | "throws", |
| 107 | "transient", |
| 108 | "try", |
| 109 | "void", |
| 110 | "volatile", |
| 111 | "while")); |