CTL.CCompat
Class AnyObj

java.lang.Object
  extended by CTL.CCompat.AnyObj
All Implemented Interfaces:
Writable

public class AnyObj
extends java.lang.Object
implements Writable

Compatibility with C++ any objects. Each class can define their AnyObj identifier by having a public string attribute anyobj_ident.


Field Summary
private  java.lang.Object data
          Contained data
 
Constructor Summary
AnyObj(T obj)
          Constructor
 
Method Summary
 java.lang.Object getData()
          Retrieve the contained data
 void read(SerialIn in)
          Read from stream
 java.lang.String toString()
          Retrieve a string representation of this object
 void write(SerialOut out)
          Write to stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

private java.lang.Object data
Contained data

Constructor Detail

AnyObj

public AnyObj(T obj)
Constructor

Method Detail

toString

public java.lang.String toString()
Retrieve a string representation of this object

Overrides:
toString in class java.lang.Object
Returns:
String

getData

public java.lang.Object getData()
Retrieve the contained data

Returns:
Object

read

public void read(SerialIn in)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException,
                 java.lang.InstantiationException,
                 java.lang.IllegalAccessException,
                 java.lang.reflect.InvocationTargetException
Read from stream

Specified by:
read in interface Writable
Parameters:
in - Stream to read from
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

write

public void write(SerialOut out)
           throws java.io.IOException,
                  java.lang.IllegalAccessException,
                  java.lang.reflect.InvocationTargetException,
                  CTLException
Write to stream

Specified by:
write in interface Writable
Parameters:
out - Stream to write to
Throws:
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException