org.apache.tapestry.util.io
Class EnumAdaptor

java.lang.Object
  extended by org.apache.tapestry.util.io.EnumAdaptor
All Implemented Interfaces:
ISqueezeAdaptor

public class EnumAdaptor
extends Object
implements ISqueezeAdaptor

Adaptor for Enum classes.

Since:
3.0
Version:
$Id: EnumAdaptor.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
EnumAdaptor()
           
 
Method Summary
 void register(DataSqueezer squeezer)
          Invoked to ask an adaptor to register itself to the squeezer.
 String squeeze(DataSqueezer squeezer, Object o)
          Converts the data object into a String.
 Object unsqueeze(DataSqueezer squeezer, String str)
          Converts a String back into an appropriate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumAdaptor

public EnumAdaptor()
Method Detail

squeeze

public String squeeze(DataSqueezer squeezer,
                      Object o)
               throws IOException
Description copied from interface: ISqueezeAdaptor
Converts the data object into a String.

Specified by:
squeeze in interface ISqueezeAdaptor
Throws:
IOException - if the object can't be converted.

unsqueeze

public Object unsqueeze(DataSqueezer squeezer,
                        String str)
                 throws IOException
Description copied from interface: ISqueezeAdaptor
Converts a String back into an appropriate object.

Specified by:
unsqueeze in interface ISqueezeAdaptor
Throws:
IOException - if the String can't be converted.

register

public void register(DataSqueezer squeezer)
Description copied from interface: ISqueezeAdaptor
Invoked to ask an adaptor to register itself to the squeezer.

Specified by:
register in interface ISqueezeAdaptor