mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Add enum name lookup method to Java/C# enums
Tested: on Linux for Java and C# Bug: 15781151 Change-Id: I7cb97bcc01d986cac2b24aaf7cb29521ddaa2f6b
This commit is contained in:
4
tests/MyGame/Example/Any.java
Executable file → Normal file
4
tests/MyGame/Example/Any.java
Executable file → Normal file
@@ -5,5 +5,9 @@ package MyGame.Example;
|
||||
public class Any {
|
||||
public static final byte NONE = 0;
|
||||
public static final byte Monster = 1;
|
||||
|
||||
private static final String[] names = { "NONE", "Monster", };
|
||||
|
||||
public static String name(int e) { return names[e]; }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user