|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.osjava.jardiff.StreamDiffHandler
public class StreamDiffHandler
A specific type of DiffHandler which uses an OutputStream to create an XML document describing the changes in the diff. This is needed for java 1.2 compatibility for the ant task.
Field Summary | |
---|---|
private java.io.BufferedWriter |
out
The javax.xml.transform.sax.Transformer used to convert the DOM to text. |
static java.lang.String |
XML_URI
The XML namespace used. |
Constructor Summary | |
---|---|
StreamDiffHandler()
Create a new StreamDiffHandler which writes to System.out |
|
StreamDiffHandler(java.io.OutputStream out)
Create a new StreamDiffHandler with the specified OutputStream. |
Method Summary | |
---|---|
protected void |
addAccessFlags(AbstractInfo info)
Add attributes describing some access flags. |
protected void |
addMethodNodes(java.lang.String desc)
Add the method nodes for the method descriptor. |
protected void |
addTypeNode(java.lang.String desc)
Add a type node for the specified descriptor. |
protected void |
addTypeNode(org.objectweb.asm.Type type)
Add a type node for the specified type. |
void |
classAdded(ClassInfo info)
Write out the class info for an added class. |
void |
classChanged(ClassInfo oldInfo,
ClassInfo newInfo)
Write out info aboout a changed class. |
void |
classRemoved(ClassInfo info)
Write out class info for a removed class. |
void |
contains(ClassInfo info)
Add a contained class. |
void |
endAdded()
End the added section. |
void |
endChanged()
End the changed section. |
void |
endClassChanged()
End the changed section for an individual class. |
void |
endDiff()
End the diff. |
void |
endNewContents()
End the list of new contents. |
void |
endOldContents()
End the list of old contents. |
void |
endRemoved()
End the removed section. |
void |
fieldAdded(FieldInfo info)
Write out info about an added field. |
void |
fieldChanged(FieldInfo oldInfo,
FieldInfo newInfo)
Write out info aboout a changed field. |
void |
fieldRemoved(FieldInfo info)
Write out info about a removed field. |
void |
methodAdded(MethodInfo info)
Write out info about a added method. |
void |
methodChanged(MethodInfo oldInfo,
MethodInfo newInfo)
Write out info aboout a changed method. |
void |
methodRemoved(MethodInfo info)
Write out info about a removed method. |
void |
startAdded()
Start the added section. |
void |
startChanged()
Start the changed section. |
void |
startClassChanged(java.lang.String internalName)
Start a changed section for an individual class. |
void |
startDiff(java.lang.String oldJar,
java.lang.String newJar)
Start the diff. |
void |
startNewContents()
Start the list of old contents. |
void |
startOldContents()
Start the list of old contents. |
void |
startRemoved()
Start the removed node. |
protected void |
writeClassInfo(ClassInfo info)
Write out information about a class. |
protected void |
writeFieldInfo(FieldInfo info)
Write out information about a field. |
protected void |
writeMethodInfo(MethodInfo info)
Write out information about a method. |
private java.lang.String |
xmlEscape(java.lang.String str)
Escape some text into a format suitable for output as xml. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XML_URI
private final java.io.BufferedWriter out
Constructor Detail |
---|
public StreamDiffHandler() throws DiffException
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic StreamDiffHandler(java.io.OutputStream out) throws DiffException
out
- Where to write output.
DiffException
Method Detail |
---|
public void startDiff(java.lang.String oldJar, java.lang.String newJar) throws DiffException
startDiff
in interface DiffHandler
oldJar
- name of old jar file.newJar
- name of new jar file.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void startOldContents() throws DiffException
startOldContents
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void startNewContents() throws DiffException
startNewContents
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void contains(ClassInfo info) throws DiffException
contains
in interface DiffHandler
info
- information about a class
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endOldContents() throws DiffException
endOldContents
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endNewContents() throws DiffException
endNewContents
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void startRemoved() throws DiffException
startRemoved
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void classRemoved(ClassInfo info) throws DiffException
classRemoved
in interface DiffHandler
info
- The info to write out.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endRemoved() throws DiffException
endRemoved
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void startAdded() throws DiffException
startAdded
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void classAdded(ClassInfo info) throws DiffException
classAdded
in interface DiffHandler
info
- The class info describing the added class.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endAdded() throws DiffException
endAdded
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void startChanged() throws DiffException
startChanged
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void startClassChanged(java.lang.String internalName) throws DiffException
startClassChanged
in interface DiffHandler
internalName
- the internal name of the class that has changed.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void fieldRemoved(FieldInfo info) throws DiffException
fieldRemoved
in interface DiffHandler
info
- Info about the field that's been removed.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void methodRemoved(MethodInfo info) throws DiffException
methodRemoved
in interface DiffHandler
info
- Info about the method that's been removed.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void fieldAdded(FieldInfo info) throws DiffException
fieldAdded
in interface DiffHandler
info
- Info about the added field.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void methodAdded(MethodInfo info) throws DiffException
methodAdded
in interface DiffHandler
info
- Info about the added method.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void classChanged(ClassInfo oldInfo, ClassInfo newInfo) throws DiffException
classChanged
in interface DiffHandler
oldInfo
- Info about the old class.newInfo
- Info about the new class.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void fieldChanged(FieldInfo oldInfo, FieldInfo newInfo) throws DiffException
fieldChanged
in interface DiffHandler
oldInfo
- Info about the old field.newInfo
- Info about the new field.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException
methodChanged
in interface DiffHandler
oldInfo
- Info about the old method.newInfo
- Info about the new method.
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endClassChanged() throws DiffException
endClassChanged
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endChanged() throws DiffException
endChanged
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic void endDiff() throws DiffException
endDiff
in interface DiffHandler
DiffException
- when there is an underlying exception, e.g.
writing to a file caused an IOExceptionprotected void writeClassInfo(ClassInfo info) throws java.io.IOException
info
- Info about the class to write out.
java.io.IOException
- when there is an underlying IOException.protected void writeMethodInfo(MethodInfo info) throws java.io.IOException
info
- Info about the method.
java.io.IOException
- when there is an underlying IOException.protected void writeFieldInfo(FieldInfo info) throws java.io.IOException
info
- Info about the field.
java.io.IOException
- when there is an underlying IOException.protected void addAccessFlags(AbstractInfo info) throws java.io.IOException
info
- Info describing the access flags.
java.io.IOException
- when there is an underlying IOException.protected void addMethodNodes(java.lang.String desc) throws java.io.IOException
desc
- The descriptor for the method to write out.
java.io.IOException
- when there is an underlying IOException.protected void addTypeNode(java.lang.String desc) throws java.io.IOException
desc
- A type descriptor.
java.io.IOException
- when there is an underlying IOException.protected void addTypeNode(org.objectweb.asm.Type type) throws java.io.IOException
type
- The type to describe.
java.io.IOException
- when there is an underlying IOException.private final java.lang.String xmlEscape(java.lang.String str)
str
- the text to format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |