com.autodesk.objects
Interface IOObject

All Known Implementing Classes:
FilesObject, TextObject

public interface IOObject

This is an interface which all input/output objects implement. Additionally all implementations of this class must implement the static method classConvertibleTo() which is used to determine which classes can be converted to each other (and in general convertibleTo() would simply be a call into this static method).

i.e.
static boolean classConvertibleTo(final Class otherClass)
...


Method Summary
 IOObject convert(java.lang.Class otherClass)
          Convert this object to an object of another class.
 boolean convertibleTo(java.lang.Class otherClass)
          Check if this object can be converted to another.
 java.lang.Class[] listClasses()
          Return a Class array of classes that this object is capable of converting itself into.
 

Method Detail

convertibleTo

boolean convertibleTo(java.lang.Class otherClass)
Check if this object can be converted to another.

Parameters:
otherClass - another class to check.
Returns:
true is returned if this object can be converted to the given class, false otherwise.

convert

IOObject convert(java.lang.Class otherClass)
Convert this object to an object of another class. If the class is the same as the given object's class then 'this' is returned.

Parameters:
otherClass - another class to cast the object to.
Returns:
an object of the other class or null if the cast is not possible. (convertibleTo(java.lang.Class) will have returned true when the cast is possible and false otherwise.)

listClasses

java.lang.Class[] listClasses()
Return a Class array of classes that this object is capable of converting itself into.

Returns:
a Class array of classes.