visidia.io
Class ClassIO

java.lang.Object
  extended by visidia.io.ClassIO
All Implemented Interfaces:
VisidiaIO
Direct Known Subclasses:
AgentIO, AlgorithmIO, SensorMoverIO

public class ClassIO
extends java.lang.Object
implements VisidiaIO

This class deals with input operations on java classes.


Constructor Summary
ClassIO(ClassIdentifier classId)
          Instantiates a new class input/output.
 
Method Summary
static ClassIdentifier getClassIdentifier(java.lang.String path, java.lang.String className)
          Gets the class identifier.
 java.lang.Object load()
          Loads the current file as an object.
static java.lang.Object load(java.lang.String path, java.lang.String className)
          Loads a class from its name and path and returns an instance of it.
 java.lang.Object recreateInSystemClassLoader(java.lang.Object obj)
          Recreate in system class loader.
 void save(java.lang.Object object)
          This function does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassIO

public ClassIO(ClassIdentifier classId)
Instantiates a new class input/output.

Parameters:
classId - the class identifier
Method Detail

getClassIdentifier

public static ClassIdentifier getClassIdentifier(java.lang.String path,
                                                 java.lang.String className)
Gets the class identifier.

Parameters:
path - the path
className - the class name
Returns:
the class identifier

load

public static java.lang.Object load(java.lang.String path,
                                    java.lang.String className)
Loads a class from its name and path and returns an instance of it.

Parameters:
path - the path
className - the class name
Returns:
the object

load

public java.lang.Object load()
Loads the current file as an object.

Specified by:
load in interface VisidiaIO
Returns:
the object
See Also:
VisidiaIO.load()

save

public void save(java.lang.Object object)
This function does nothing. A class cannot be saved.

Specified by:
save in interface VisidiaIO
Parameters:
object - the object
See Also:
VisidiaIO.save(java.lang.Object)

recreateInSystemClassLoader

public java.lang.Object recreateInSystemClassLoader(java.lang.Object obj)
Recreate in system class loader.

Parameters:
obj - the object
Returns:
the object