【Java开源代码栏目提醒】:以下是网学会员为您推荐的Java开源代码-XMLGeneratorIF.java,希望本篇文章对您学习有所帮助。
/* -*- mode: Java; fill-column: 72 -*-
* The contents of this file are subject to the ClickBlocks Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.clickblocks.org
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied, including, but not limited to, the implied warranties of
* merchantability, fitness for a particular purpose and
* non-infringement. See the License for the specific language
* governing rights and limitations under the License.
*
* ClickBlocks, the ClickBlocks logo and combinations thereof are
* trademarks of ClickBlocks, LLC in the United States and other
* countries.
*
* The Initial Developer of the Original Code is ClickBlocks, LLC.
* Portions created by ClickBlocks, LLC are Copyright (C) 2000.
* All Rights Reserved.
*/
/*
* $Log: XMLGeneratorIF.java,v $
* Revision 1.2 2000/10/30 12:15:25 mgrand
* ported to cvs package structure
*
* Revision 1.1 2000/10/30 12:02:49 mgrand
* reestablished local repository
*/
package org.clickblocks.objectToXML;
import java.io.NotActiveException;
import java.lang.reflect.InvocationTargetException;
/**
* This interface in implemented by classes that control XML generation for
* other classes.
* @stereotype mi-detail
* @author Mark Grand
*/
public interface XMLGeneratorIF {
/**
* This method is called by <code>XMLOutputStream</code> to control
* the XML generation for another class. The connection between a
* class and an object that implements this interface is made by
* registering the combination with the <code>XMLOutputStream</code>
* class's <code>registerXMLBehavior</code> method.
* @param out The XMLOutputStream to use
* @param obj the object to geenrate XML for.
* @return a node that represents the XML for the given object.
* @exception NotActiveException
* May be thrown if this is called when the given
* <code>XMLOutputStream</code> has no pending call to its
* <code>writeXML</code> method.
* @see org.clickblocks.objectToXML.XMLOutputStream#registerXMLBehavior
*/
public void generateXML(ObjectToXML out,
Object obj) throws NotActiveException,
InvocationTargetException;
} // interface XMLGeneratorIF