public class PlainValueTypeNamer extends Object implements ValueTypeNamer
This is a wrapper of the static method luaTypeToName(LuaType)
.
Modifier and Type | Field and Description |
---|---|
static PlainValueTypeNamer |
INSTANCE
A static instance of this value type namer.
|
Constructor and Description |
---|
PlainValueTypeNamer() |
Modifier and Type | Method and Description |
---|---|
static ByteString |
luaTypeToName(LuaType type)
Returns the name (a string) of a given Lua type.
|
ByteString |
typeNameOf(Object instance)
Returns the type name (a byte string) of the value
instance . |
public static final PlainValueTypeNamer INSTANCE
public static ByteString luaTypeToName(LuaType type)
The result of this method is one of "nil"
, "boolean"
, "number"
,
"string"
, "table"
, "function"
, "userdata"
and "thread"
.
type
- the type, must not be null
type
NullPointerException
- if type
is null
public ByteString typeNameOf(Object instance)
ValueTypeNamer
instance
.typeNameOf
in interface ValueTypeNamer
instance
- the object in question, may be null
instance
Copyright © 2016. All rights reserved.