com.sun.codemodel.fmt
Class JSerializedObject

java.lang.Object
  extended by com.sun.codemodel.JResourceFile
      extended by com.sun.codemodel.fmt.JSerializedObject

public class JSerializedObject
extends JResourceFile

A simple class that takes an object and serializes it into a file in the parent package with the given name.


Constructor Summary
JSerializedObject(java.lang.String name, java.lang.Object obj)
           
 
Method Summary
protected  void build(java.io.OutputStream os)
          called by JPackage to serialize the object
 
Methods inherited from class com.sun.codemodel.JResourceFile
isResource, name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSerializedObject

public JSerializedObject(java.lang.String name,
                         java.lang.Object obj)
                  throws java.io.IOException
Throws:
java.io.IOException - If the serialization fails, this exception is thrown
Method Detail

build

protected void build(java.io.OutputStream os)
              throws java.io.IOException
called by JPackage to serialize the object

Specified by:
build in class JResourceFile
Throws:
java.io.IOException


Copyright © 2005-2010 Sun Microsystems. All Rights Reserved.