com.sun.tools.xjc
Class XJCListener

java.lang.Object
  extended by com.sun.tools.xjc.XJCListener
All Implemented Interfaces:
ErrorListener, org.xml.sax.ErrorHandler

public abstract class XJCListener
extends java.lang.Object
implements ErrorListener

Call-back interface that can be implemented by the caller of Driver to receive output from XJC.

Most of the messages XJC produce once the real work starts is structured as (message,source). Those outputs will be reported to various methods on ErrorListener, which is inherited by this interface.

The other messages (such as the usage screen when there was an error in the command line option) will go to the message(String) method.

Since:
JAXB 2.0 EA

Constructor Summary
XJCListener()
           
 
Method Summary
 void compiled(Outline outline)
          Called after the schema is compiled and the code generation strategy is determined, but before any code is actually generated as files.
 void generatedFile(java.lang.String fileName)
          Called for each file generated by XJC.
 void message(java.lang.String msg)
          Other miscellenous messages that do not have structures will be reported through this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.tools.xjc.api.ErrorListener
error, fatalError, info, warning
 

Constructor Detail

XJCListener

public XJCListener()
Method Detail

generatedFile

public void generatedFile(java.lang.String fileName)
Called for each file generated by XJC.

XJC may generate not only source files but also resources files. The file name includes the path portions that correspond with the package name.

When generating files into a directory, file names will be relative to the output directory. When generating files into a zip file, file names will be those in the zip file.

Parameters:
fileName - file names like "org/acme/foo/Foo.java" or "org/acme/foo/jaxb.properties".

message

public void message(java.lang.String msg)
Other miscellenous messages that do not have structures will be reported through this method. This method is used like PrintStream.println(String). The callee is expected to add '\n'.


compiled

public void compiled(Outline outline)
Called after the schema is compiled and the code generation strategy is determined, but before any code is actually generated as files.

Parameters:
outline - never null. this is the root object that represents the code generation strategy.