com.threerings.presents.tools
Class GenStreamableTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.threerings.presents.tools.GenTask
              extended by com.threerings.presents.tools.GenStreamableTask
All Implemented Interfaces:
Cloneable

public class GenStreamableTask
extends GenTask

Generates readObject() and writeObject() methods for Streamable classes that have protected or private members so that they can be used in a sandboxed environment.


Field Summary
protected  ArrayList<FileSet> _filesets
          A list of filesets that contain tile images.
protected static String READ_CLOSE
           
protected static String READ_OPEN
           
protected static String WRITE_CLOSE
           
protected static String WRITE_OPEN
           
 
Fields inherited from class com.threerings.presents.tools.GenTask
_checking, _cloader, _header, _modifiedPaths, EOL
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
GenStreamableTask()
           
 
Method Summary
 void addFileset(FileSet set)
          Adds a nested <fileset> element which enumerates streamable source files.
 void execute()
          Performs the actual work of the task.
protected  void processClass(File source)
          Processes a Streamable source file.
protected  void processClass(File source, Class<?> sclass)
          Processes a resolved Streamable class instance.
protected  String toReadObject(Field field)
           
protected  String toWriteObject(Field field)
           
 
Methods inherited from class com.threerings.presents.tools.GenTask
convertEols, createMap, loadClass, loadClass, mergeTemplate, mergeTemplate, setChecking, setClasspathref, setHeader, wouldProduceSameFile, writeFile, writeTemplate, writeTemplate
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_filesets

protected ArrayList<FileSet> _filesets
A list of filesets that contain tile images.


READ_OPEN

protected static final String READ_OPEN
See Also:
Constant Field Values

READ_CLOSE

protected static final String READ_CLOSE
See Also:
Constant Field Values

WRITE_OPEN

protected static final String WRITE_OPEN
See Also:
Constant Field Values

WRITE_CLOSE

protected static final String WRITE_CLOSE
See Also:
Constant Field Values
Constructor Detail

GenStreamableTask

public GenStreamableTask()
Method Detail

addFileset

public void addFileset(FileSet set)
Adds a nested <fileset> element which enumerates streamable source files.

Overrides:
addFileset in class GenTask

execute

public void execute()
Description copied from class: GenTask
Performs the actual work of the task.

Overrides:
execute in class GenTask

processClass

protected void processClass(File source)
Processes a Streamable source file.


processClass

protected void processClass(File source,
                            Class<?> sclass)
                     throws IOException
Processes a resolved Streamable class instance.

Specified by:
processClass in class GenTask
Throws:
IOException

toReadObject

protected String toReadObject(Field field)

toWriteObject

protected String toWriteObject(Field field)