com.autodesk.objects
Class TextObject

java.lang.Object
  extended by com.autodesk.objects.TextObject
All Implemented Interfaces:
IOObject

public class TextObject
extends java.lang.Object
implements IOObject

This class represents a collection of files or directories. The files may be absolute or relative. If they are relative then there is a single directory given that the files are relative to.


Constructor Summary
TextObject(java.lang.String str)
          Create a TextObject.
TextObject(java.lang.String[] str)
          Create a TextObject.
 
Method Summary
static boolean classConvertibleTo(java.lang.Class otherClass)
          Determine if this class is convertible to another IOObject class.
 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.String[] getText()
          Get the text this object references.
 java.lang.Class[] listClasses()
          Return a Class array of classes that this object is capable of converting itself into.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextObject

public TextObject(java.lang.String[] str)
Create a TextObject.

Parameters:
str - the String array of text that is to be used. This may be null. The array is shallow copied (i.e. the array is copied but the Strings referenced are not, since Strings are immutable).

TextObject

public TextObject(java.lang.String str)
Create a TextObject.

Parameters:
str - the String of text that is to be used. This may be null.
Method Detail

classConvertibleTo

public static boolean classConvertibleTo(java.lang.Class otherClass)
Determine if this class is convertible to another IOObject class. This method is required by all IOObject implementations.

Parameters:
otherClass - class to test.
Returns:
true is returned if this object can be converted to the given class, false otherwise.
See Also:
IOObject

convertibleTo

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

Specified by:
convertibleTo in interface IOObject
Parameters:
otherClass - another class to check.
Returns:
true is returned if this object can be converted to the given class, false otherwise.
See Also:
IOObject.convertibleTo(Class)

convert

public IOObject convert(java.lang.Class otherClass)
Convert this object to an object of another class.

Specified by:
convert in interface IOObject
Parameters:
otherClass - another class to cast the object to.
Returns:
an object of the other class or null if the conversion is not possible. (convertibleTo() will return true when the conversion is possible and false otherwise.)
See Also:
IOObject.convert(Class)

listClasses

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

Specified by:
listClasses in interface IOObject
Returns:
a Class array of class.
See Also:
IOObject.listClasses()

getText

public java.lang.String[] getText()
Get the text this object references. This method returns a reference to the internal Strings array for efficiency. If you need to make changes to the array you must clone it first.

Returns:
the array of Strings. This may be null if the TextObject was initialized with a null String array reference.