org.codehaus.metaclass.io
Interface MetaClassIO

All Known Implementing Classes:
org.codehaus.metaclass.io.AbstractMetaClassIO, MetaClassIOASM

public interface MetaClassIO

This is the interface used to read and write descriptors into Input and Output streams.

Version:
$Revision: 1.8 $ $Date: 2003/12/11 08:41:50 $
Author:
Doug Hagan

Method Summary
 ClassDescriptor deserializeClass(java.io.InputStream input)
          Read a ClassDescriptor from an input stream.
 java.lang.String getResourceName(java.lang.String classname)
          Get the name of resource the metadata is stored in for specified class.
 void writeDescriptor(java.io.File baseDir, ClassDescriptor descriptor)
          Write a ClassDescriptor to a file relative to specified base directory.
 

Method Detail

deserializeClass

public ClassDescriptor deserializeClass(java.io.InputStream input)
                                 throws java.lang.Exception
Read a ClassDescriptor from an input stream.

Parameters:
input - the input stream
Returns:
the ClassDescriptor
Throws:
java.lang.Exception - if unable ot read class descriptor

getResourceName

public java.lang.String getResourceName(java.lang.String classname)
Get the name of resource the metadata is stored in for specified class.

Parameters:
classname - the name of class
Returns:
the resource name

writeDescriptor

public void writeDescriptor(java.io.File baseDir,
                            ClassDescriptor descriptor)
                     throws java.lang.Exception
Write a ClassDescriptor to a file relative to specified base directory.

Parameters:
baseDir - the base directory to output to.
descriptor - the ClassDescriptor to write out.
Throws:
java.lang.Exception - if unable ot write class descriptor.


Copyright © 2003-2004 Codehaus. All Rights Reserved.