Package com.sun.codemodel.fmt
Class JSerializedObject
- java.lang.Object
-
- com.sun.codemodel.JResourceFile
-
- 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
Constructors Constructor Description JSerializedObject(String name, Object obj)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
build(OutputStream os)
called by JPackage to serialize the object-
Methods inherited from class com.sun.codemodel.JResourceFile
isResource, name
-
-
-
-
Constructor Detail
-
JSerializedObject
public JSerializedObject(String name, Object obj) throws IOException
- Throws:
IOException
- If the serialization fails, this exception is thrown
-
-
Method Detail
-
build
protected void build(OutputStream os) throws IOException
called by JPackage to serialize the object- Specified by:
build
in classJResourceFile
- Throws:
IOException
-
-