public abstract class DefaultUserdata extends Userdata
Constructor and Description |
---|
DefaultUserdata(Table metatable,
Object userValue)
Constructs a new instance of this userdata with the specified initial
metatable
and userValue . |
Modifier and Type | Method and Description |
---|---|
Table |
getMetatable()
Returns the metatable of this object, or
null if this object does not have
a metatable. |
Object |
getUserValue()
Returns the user value attached to this full userdata.
|
Table |
setMetatable(Table mt)
Sets the metatable of this object to
mt . |
Object |
setUserValue(Object value)
Sets the user value attached to this full userdata to
value , returning
the old user value. |
public Table getMetatable()
LuaObject
null
if this object does not have
a metatable.getMetatable
in class LuaObject
null
if this object does not have
a metatablepublic Table setMetatable(Table mt)
LuaObject
mt
. mt
may be null
:
in that case, removes the metatable from this object.
Returns the metatable previously associated with this object (i.e., the metatable
before the call of this method; possibly null
).
setMetatable
in class LuaObject
mt
- new metatable to attach to this object, may be null
public Object getUserValue()
Userdata
getUserValue
in class Userdata
public Object setUserValue(Object value)
Userdata
value
, returning
the old user value.setUserValue
in class Userdata
value
- new user value, may be null
Copyright © 2016. All rights reserved.