Package party.iroiro.luajava
Enum Class Lua.Conversion
- All Implemented Interfaces:
Serializable,Comparable<Lua.Conversion>,Constable
- Enclosing interface:
- Lua
Controls the degree of conversion from Java to Lua
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConverts everything possible, including the following classes: Boolean -> boolean String -> string ByteBuffer -> string Number -> lua_Number Map / Collection / Array -> table (recursive) Object -> Java object wrapped by a metatableLua.pushJavaObject(java.lang.Object)All objects, includingInteger, for example, are pushed as either Java objects (withLua.pushJavaObject(Object)) or Java arrays (withLua.pushJavaArray(Object)).Converts immutable types, including: Boolean String Number -
Method Summary
Modifier and TypeMethodDescriptionstatic Lua.ConversionReturns the enum constant of this class with the specified name.static Lua.Conversion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FULL
Converts everything possible, including the following classes:- Boolean -> boolean
- String -> string
- ByteBuffer -> string
- Number -> lua_Number
- Map / Collection / Array -> table (recursive)
- Object -> Java object wrapped by a metatable
Lua.pushJavaObject(java.lang.Object)
Note that this means luatable changes on the lua side will not get reflected to the Java side.
-
SEMI
Converts immutable types, including:- Boolean
- String
- Number
Map,Collection, etc. are pushed withLua.pushJavaObject(Object). Arrays are pushed withLua.pushJavaArray(Object). -
NONE
All objects, includingInteger, for example, are pushed as either Java objects (withLua.pushJavaObject(Object)) or Java arrays (withLua.pushJavaArray(Object)).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-