mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Implements type promotion for Java enum (#6382)
* Implements type promotion for Java enum as suggested in #3890, #5111, #6369 * After generate_code.sh
This commit is contained in:
@@ -7,16 +7,16 @@ package MyGame.Example;
|
||||
*/
|
||||
public final class Color {
|
||||
private Color() { }
|
||||
public static final byte Red = 1;
|
||||
public static final int Red = 1;
|
||||
/**
|
||||
* \brief color Green
|
||||
* Green is bit_flag with value (1u << 1)
|
||||
*/
|
||||
public static final byte Green = 2;
|
||||
public static final int Green = 2;
|
||||
/**
|
||||
* \brief color Blue (1u << 3)
|
||||
*/
|
||||
public static final byte Blue = 8;
|
||||
public static final int Blue = 8;
|
||||
|
||||
public static final String[] names = { "Red", "Green", "", "", "", "", "", "Blue", };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user