Package org.ldk.structs
Class Type
- java.lang.Object
-
- org.ldk.structs.Type
-
public class Type extends Object
Defines a type identifier for sending messages over the wire. Messages implementing this trait specify a type and must be [`Writeable`].
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Type.TypeInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Type
clone()
Creates a copy of a TypeString
debug_str()
Return a human-readable "debug" string describing this objectvoid
destroy()
Destroys the object, freeing associated resources.protected void
finalize()
static Type
new_impl(Type.TypeInterface arg)
short
type_id()
Returns the type identifying the message payload.byte[]
write()
Serialize the object into a byte array
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
destroy
public void destroy()
Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
-
new_impl
public static Type new_impl(Type.TypeInterface arg)
-
type_id
public short type_id()
Returns the type identifying the message payload.
-
debug_str
public String debug_str()
Return a human-readable "debug" string describing this object
-
write
public byte[] write()
Serialize the object into a byte array
-
-