using Java enums or public static fields in MATLAB
- by Jason S
I'm wondering how in MATLAB you can get a reference to a Java enum or static public field. In MATLAB, if you are trying to use Java objects/methods, there are equivalents to Java object creation / method call / etc.:
Java: new com.example.test.Foo();
MATLAB: javaObject('com.example.test.Foo');
Java: com.example.test.Foo.staticMethod();
MATLAB: javaMethod('staticMethod', 'com.example.test.Foo');
Java: SomeEnum e = com.example.test.SomeEnum.MY_FAVORITE_ENUM;
MATLAB: ?????
Java: int n = com.example.test.Foo.MAX_FOO;
MATLAB: ?????