You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a JSObject interface method returns an enumeration of values, could they be translated directly to an enum, instead of an int or string?
First example: If the enumeration implements an interface the value could be retrieved, example:
public enum State implements JSEnum<String> {
OPEN("open"),
CLOSE("close")
// ...
@Override
public String getValue(){
....
}
}
Second example: Using custom annotation on the enum field:
public enum State implements JSObject {
@JSEnumString("open")
OPEN,
@JSEnumString("close")
CLOSE
}
The text was updated successfully, but these errors were encountered:
When a JSObject interface method returns an enumeration of values, could they be translated directly to an enum, instead of an
int
orstring
?First example: If the enumeration implements an interface the value could be retrieved, example:
Second example: Using custom annotation on the enum field:
The text was updated successfully, but these errors were encountered: