jardiff-0.2/ 40755 0 0 0 10376451445 10023 5ustar 0 0 jardiff-0.2/src/ 40755 0 0 0 10376451445 10612 5ustar 0 0 jardiff-0.2/src/examples/ 40755 0 0 0 10376451445 12430 5ustar 0 0 jardiff-0.2/src/java/ 40755 0 0 0 10376451445 11533 5ustar 0 0 jardiff-0.2/src/java/org/ 40755 0 0 0 10376451445 12322 5ustar 0 0 jardiff-0.2/src/java/org/osjava/ 40755 0 0 0 10376451445 13605 5ustar 0 0 jardiff-0.2/src/java/org/osjava/jardiff/ 40755 0 0 0 10376451445 15212 5ustar 0 0 jardiff-0.2/src/java/org/osjava/jardiff/ant/ 40755 0 0 0 10376451445 15774 5ustar 0 0 jardiff-0.2/src/xsl/ 40755 0 0 0 10376451445 11420 5ustar 0 0 jardiff-0.2/src/resources/ 40755 0 0 0 10376451445 12624 5ustar 0 0 jardiff-0.2/LICENSE.txt100644 0 0 2713 10376451445 11746 0ustar 0 0 JarDiff Copyright (c) 2005, Antony Riley All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Neither the name JarDiff nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. jardiff-0.2/project.properties100644 0 0 1261 10376451445 13704 0ustar 0 0 maven.ui.navcol.background=#f4f8d8 maven.ui.banner.background=#000066 maven.ui.section.background=#000066 maven.ui.subsection.background=#000066 maven.ui.breadcrumbs.background=#f4f8d8 maven.xdoc.theme=classic maven.xdoc.poweredby.image=maven-feather.png maven.xdoc.includeProjectDocumentation=false maven.xdoc.date = left maven.xdoc.version = v${pom.currentVersion} maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory #maven.checkstyle.properties=../hen_checkstyle.xml maven.javadoc.stylesheet = ../osjavadoc-style.css maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/ maven.jar.mainclass=org.osjava.jardiff.Main maven.uberjar.main=org.osjava.jardiff.Main jardiff-0.2/project.xml100644 0 0 11232 10376451445 12327 0ustar 0 0 3 jardiff jardiff 0.2 OSJava http://www.osjava.org/ http://www.osjava.org/images/osjava.gif 2005 org.osjava.jardiff http://www.osjava.org/images/osjava.gif Background At OSjava, we were using a shell script to work out API differences between our release versions. This unfortunately doesn't scale very well to larger projects, the main reason for jardiff was to do the same in a much shorter time (From memory it was taking minutes to get the API diff from two fairly small jars). In it's current state, jardiff can generate the api differences between rt.jar for java 1.4 and java 1.5 in under 20 seconds, so it should scale to even the largest of projects. ]]> A jar diff generator http://www.osjava.org/jardiff/ http://issues.osjava.org/jira/browse/JDF dist.osjava.org/maven/jardiff/ /sites/org/osjava/www/maven/jardiff/ /sites/org/osjava/www/maven/builds/jardiff/ scm:svn:http://svn.osjava.org/svn/osjava/trunk/jardiff http://svn.osjava.org/svn/osjava/trunk/jardiff osjava-users http://lists.osjava.org/mailman/listinfo/osjava-users http://lists.osjava.org/mailman/listinfo/osjava-users http://lists.osjava.org/mailman/private/osjava-users/ Antony Riley antony cyberiantiger@gmail.com osjava Java Developer asm asm 2.1 http://asm.objectweb.org/ asm asm-commons 2.1 http://asm.objectweb.org/ commons-cli 1.0 http://jakarta.apache.org/commons/cli/ ant ant 1.6.5 http://ant.apache.org/ false ant ant-trax 1.6.5 http://ant.apache.org/ false cyberiantiger@gmail.com src/java style src/xsl jardiff-html.xsl jardiff-text.xsl jardiff-xhtml.xsl jardiff-html-base.xsl ant src/resources jardiff.properties maven-jxr-plugin maven-javadoc-plugin maven-license-plugin maven-changes-plugin jardiff-0.2/build.xml100644 0 0 12641 10376451445 11765 0ustar 0 0 ================================= WARNING ================================ Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed. ========================================================================== jardiff-0.2/src/examples/jardiff-0.1-0.2.html100644 0 0 11647 10376451445 15642 0ustar 0 0 Comparing jardiff-0.1.jar to jardiff-0.2.jar

Comparing jardiff-0.1.jar to jardiff-0.2.jar

Removed classes

Added classes

Changed classes

API diff generated by JarDiff

jardiff-0.2/src/examples/build.xml100644 0 0 3241 10376451445 14346 0ustar 0 0 jardiff-0.2/src/examples/README.txt100644 0 0 524 10376451445 14204 0ustar 0 0 This directory contains the following examples. (They both require that you run maven uberjar first, or change the library paths appropriately). jardiff.sh - shell script to perform a jardiff between jardiff 0.1 and jardiff 0.2 build.xml - ant build script to perform a jardiff between jardiff 0.1 and jardiff 0.2 jardiff-0.2/src/examples/diff.css100644 0 0 0 10376451445 14055 0ustar 0 0 jardiff-0.2/src/examples/jardiff-0.1-0.2.txt100644 0 0 5046 10376451445 15471 0ustar 0 0 Comparing jardiff-0.1.jar to jardiff-0.2.jar Class removed: public org.osjava.jardiff.SAXDiffHandler extends java.lang.Object implements org.osjava.jardiff.DiffHandler Class added: public org.osjava.jardiff.Main extends java.lang.Object Class added: public org.osjava.jardiff.StreamDiffHandler extends java.lang.Object implements org.osjava.jardiff.DiffHandler Class added: public org.osjava.jardiff.ant.JDTraXLiaison extends java.lang.Object implements org.osjava.jardiff.ant.JDXSLTLiaison3, javax.xml.transform.ErrorListener, org.apache.tools.ant.taskdefs.XSLTLoggerAware Class added: public abstract org.osjava.jardiff.ant.JDXSLTLiaison3 extends java.lang.Object implements org.apache.tools.ant.taskdefs.XSLTLiaison2 Class added: public org.osjava.jardiff.ant.JDXSLTProcess extends org.apache.tools.ant.taskdefs.MatchingTask implements org.apache.tools.ant.taskdefs.XSLTLogger Class added: public org.osjava.jardiff.ant.JDXSLTProcess.Factory extends java.lang.Object Class added: public org.osjava.jardiff.ant.JDXSLTProcess.Factory.Attribute extends java.lang.Object implements org.apache.tools.ant.DynamicConfigurator Class added: public org.osjava.jardiff.ant.JDXSLTProcess.OutputProperty extends java.lang.Object Class added: public org.osjava.jardiff.ant.JDXSLTProcess.Param extends java.lang.Object Class added: public org.osjava.jardiff.ant.JarDiffTask extends org.apache.tools.ant.Task Class changed: org.osjava.jardiff.DOMDiffHandler Methods added: public void contains(org.osjava.jardiff.ClassInfo) throws org.osjava.jardiff.DiffException; public void endNewContents() throws org.osjava.jardiff.DiffException; public void endOldContents() throws org.osjava.jardiff.DiffException; public void startNewContents() throws org.osjava.jardiff.DiffException; public void startOldContents() throws org.osjava.jardiff.DiffException; Class changed: org.osjava.jardiff.DiffHandler Methods added: public abstract void contains(org.osjava.jardiff.ClassInfo) throws org.osjava.jardiff.DiffException; public abstract void endNewContents() throws org.osjava.jardiff.DiffException; public abstract void endOldContents() throws org.osjava.jardiff.DiffException; public abstract void startNewContents() throws org.osjava.jardiff.DiffException; public abstract void startOldContents() throws org.osjava.jardiff.DiffException; Class changed: org.osjava.jardiff.JarDiff Methods removed: public static void main(java.lang.String[]) throws java.lang.Exception; API diff generated by JarDiff http://www.osjava.org/jardiff/ jardiff-0.2/src/examples/jardiff-0.2.jar100644 0 0 146626 10376451445 15204 0ustar 0 0 PK ȪT4 META-INF/PKǪT4META-INF/MANIFEST.MFj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14]]J t++HVydT)KI2FjM;->JUZS͵ySrMuke i˝( $ *Kf'j_ q%X) TRF9΁_E.C|!LFՠI*oXHYiVJXAdAI2ɭƈ G8V!12deMm=\n"$)}C[8V\82@{*)FTYwؕ4@.{&JN+ysYZ$5AFK1|LogPK5 PK ȪT4 AMETA-INF/PKǪT4:'META-INF/MANIFEST.MFPK ǪT4A>org/PK ǪT4 A`org/osjava/PK ǪT4Aorg/osjava/jardiff/PK ǪT4Aorg/osjava/jardiff/ant/PK ǪT4Astyle/PK ǪT4Aant/PKǪT4D;4f  %5org/osjava/jardiff/AbstractInfo.classPKǪT4^(\V"org/osjava/jardiff/ClassInfo.classPKǪT4`HB& T org/osjava/jardiff/JarDiff.classPKǪT4sv/U )org/osjava/jardiff/ClassInfoVisitor.classPKǪT4T &org/osjava/jardiff/DiffException.classPKǪT4۾=$i org/osjava/jardiff/DiffHandler.classPKǪT44e"l"org/osjava/jardiff/FieldInfo.classPKǪT4ތ#y$org/osjava/jardiff/MethodInfo.classPKǪT4]ǜ%&org/osjava/jardiff/DiffCriteria.classPKǪT4w,'org/osjava/jardiff/AbstractDiffHandler.classPKǪT4ऺV; +0*org/osjava/jardiff/SimpleDiffCriteria.classPKǪT4D.org/osjava/jardiff/Tools.classPKǪT4F-'1org/osjava/jardiff/DOMDiffHandler.classPKǪT4V0^B-*WDorg/osjava/jardiff/StreamDiffHandler.classPKǪT4F0g0 Worg/osjava/jardiff/ant/JDXSLTProcess$Param.classPKǪT4'/Ʀa9Zorg/osjava/jardiff/ant/JDXSLTProcess$OutputProperty.classPKǪT4L5m<\org/osjava/jardiff/ant/JDXSLTProcess$Factory$Attribute.classPKǪT42J2h`org/osjava/jardiff/ant/JDXSLTProcess$Factory.classPKǪT4y6corg/osjava/jardiff/ant/JDXSLTProcess$StyleMapper.classPKǪT4ը,Vforg/osjava/jardiff/ant/JDXSLTProcess$1.classPKǪT4LOS6*Pgorg/osjava/jardiff/ant/JDXSLTProcess.classPKǪT4+ch3  ()org/osjava/jardiff/ant/JarDiffTask.classPKǪT4IV+org/osjava/jardiff/ant/JDXSLTLiaison3.classPKǪT46CW.*χorg/osjava/jardiff/ant/JDTraXLiaison.classPKǪT4mKޛorg/osjava/jardiff/Main$1.classPKǪT47rOZ vorg/osjava/jardiff/Main.classPKǪT432style/jardiff-text.xslPKǪT4Ii; rF|style/jardiff-html-base.xslPKǪT4~style/jardiff-html.xslPKǪT4g}*style/jardiff-xhtml.xslPKǪT4?5\xVant/jardiff.propertiesPKL45 META-INF/LICENSE.txtPK((> Bjardiff-0.2/src/examples/jardiff.sh100644 0 0 775 10376451445 14457 0ustar 0 0 #! /bin/sh if [ ! -f jardiff-0.1.jar ]; then wget 'http://www.ibiblio.org/maven/jardiff/jars/jardiff-0.1.jar' || exit 1 fi if [ ! -f jardiff-0.2.jar ]; then wget 'http://www.ibiblio.org/maven/jardiff/jars/jardiff-0.2.jar' || exit 1 fi java -jar ../../target/jardiff-0.2-uber.jar -f jardiff-0.1.jar \ -t jardiff-0.2.jar -o html -O jardiff-0.1-0.2.html \ -fa "http://dist.osjava.org/releases/multidoc-jnr/jardiff/0.1" \ -ta "http://dist.osjava.org/releases/multidoc-jnr/jardiff/0.2" \ -s "diff.css" jardiff-0.2/src/examples/jardiff-0.1.jar100644 0 0 75022 10376451445 15152 0ustar 0 0 PK T N4 META-INF/PKS N4META-INF/MANIFEST.MFj0E~@wNE n )ٖ;J쑑J)6^1 0aS_I5AGͽb^g IoRps`]VG$~1=턭\ !*s#aZ!YJӼqpD?M>xeS4߬0 )pWx/R|PKP>nPK T N4org/PK T N4 org/osjava/PK T N4org/osjava/jardiff/PK T N4style/PKT N4%org/osjava/jardiff/AbstractInfo.classMlE8l{ m m&Ѧ%ijflpvup+gk/R Grʕ+'ěfk3*K3{]~,>@{i,"b+b.*rkb!PG 9İ.)l0\,ݭW+%}}B;B5lHJ ٶ'Aw6kRpdXUQYSki>0$~@uSO`ݡ#cm-ƷꚼY-h1ٔ!z}ػx *ήK5 6)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fk^ ed)HIPPIAYG8U t;~LmfXm+@>pa^#"d|IŧGŨ9!& F'@+˧[UWX O ҭm,lo8;VsNpf⤉zN,F%>?kP62T$\V^NbЩ ұ]FQ>$ؓ0X ,9S2ynb}̣MI!ݧ?qRLQ+AŷusIsζ0\Z9Eǥw\=:;_볿PK/&PKL4META-INF/LICENSE.txtRn6+.f5AtPvEḰ,$DOb =3-M76u_qv,X4~0JڟܕӉRD{ƴ420P;tp;"~h+x2z1ΡGߵq@Fٍg?Ϯ10t ~N]ztvB?2(ߩtGe!`nA1kKL;1BOt¬8lbnxgi&99YF:}{>OeXfv+ {]k Q@v+(WAVІxU ZY-WU|XL@[14]]J t++HVydT)KI2FjM;->JUZS͵ySrMuke i˝( $ *Kf'j_ q%X) TRF9΁_E.C|!LFՠI*oXHYiVJXAdAI2ɭƈ G8V!12deMm=\n"$)}C[8V\82@{*)FTYwؕ4@.{&JN+ysYZ$5AFK1|LogPK5 PK T N4 AMETA-INF/PKS N4P>n'META-INF/MANIFEST.MFPK T N4AAorg/PK T N4 Acorg/osjava/PK T N4Aorg/osjava/jardiff/PK T N4Astyle/PKT N4D;4f  %org/osjava/jardiff/AbstractInfo.classPKT N4^(\V"Torg/osjava/jardiff/ClassInfo.classPKT N4H $J" org/osjava/jardiff/JarDiff$1.classPKT N4-O+: org/osjava/jardiff/JarDiff.classPKT N4sv/U )&org/osjava/jardiff/ClassInfoVisitor.classPKT N4T &*org/osjava/jardiff/DiffException.classPKT N4v$),org/osjava/jardiff/DiffHandler.classPKT N44e"-org/osjava/jardiff/FieldInfo.classPKT N4ތ# 0org/osjava/jardiff/MethodInfo.classPKT N4]ǜ% 2org/osjava/jardiff/DiffCriteria.classPKT N4w,O3org/osjava/jardiff/AbstractDiffHandler.classPKT N4ऺV; +5org/osjava/jardiff/SimpleDiffCriteria.classPKT N4DU:org/osjava/jardiff/Tools.classPKT N44]ɒY,'<org/osjava/jardiff/SAXDiffHandler.classPKT N4Jj{+'Norg/osjava/jardiff/DOMDiffHandler.classPKT N4~Zastyle/jardiff-html.xslPKT N4mbstyle/jardiff-text.xslPKT N4g}gstyle/jardiff-xhtml.xslPKT N4/&hstyle/jardiff-html-base.xslPKL45 $oMETA-INF/LICENSE.txtPKprjardiff-0.2/src/java/org/osjava/jardiff/SimpleDiffCriteria.java100644 0 0 14504 10376451445 21703 0ustar 0 0 /* * org.osjava.jardiff.SimpleDiffCriteria * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import java.util.Arrays; import java.util.HashSet; /** * A specific type of DiffCriteria which is only true for classes, methods * and fields which are not synthetic, and are public or protected. * * @author Antony Riley */ public class SimpleDiffCriteria implements DiffCriteria { /** * Check if a class is valid. * If the class is not synthetic and is public or protected, return true. * * @param info Info describing the class. * @return True if the class meets the criteria, false otherwise. */ public boolean validClass(ClassInfo info) { return !info.isSynthetic() && (info.isPublic() || info.isProtected()); } /** * Check if a method is valid. * If the method is not synthetic and is public or protected, return true. * * @param info Info describing the method. * @return True if the method meets the criteria, false otherwise. */ public boolean validMethod(MethodInfo info) { return !info.isSynthetic() && (info.isPublic() || info.isProtected()); } /** * Check if a field is valid. * If the method is not synthetic and is public or protected, return true. * * @param info Info describing the field. * @return True if the field meets the criteria, false otherwise. */ public boolean validField(FieldInfo info) { return !info.isSynthetic() && (info.isPublic() || info.isProtected()); } /** * Check if there is a change between two versions of a class. * Returns true if the access flags differ, or if the superclass differs * or if the implemented interfaces differ. * * @param oldInfo Info about the old version of the class. * @param newInfo Info about the new version of the class. * @return True if the classes differ, false otherwise. */ public boolean differs(ClassInfo oldInfo, ClassInfo newInfo) { if (oldInfo.getAccess() != newInfo.getAccess()) return true; // Yes classes can have a null supername, e.g. java.lang.Object ! if(oldInfo.getSupername() == null) { if(newInfo.getSupername() != null) { return true; } } else if (!oldInfo.getSupername().equals(newInfo.getSupername())) { return true; } java.util.Set oldInterfaces = new HashSet(Arrays.asList(oldInfo.getInterfaces())); java.util.Set newInterfaces = new HashSet(Arrays.asList(newInfo.getInterfaces())); if (!oldInterfaces.equals(newInterfaces)) return true; return false; } /** * Check if there is a change between two versions of a method. * Returns true if the access flags differ, or if the thrown * exceptions differ. * * @param oldInfo Info about the old version of the method. * @param newInfo Info about the new version of the method. * @return True if the methods differ, false otherwise. */ public boolean differs(MethodInfo oldInfo, MethodInfo newInfo) { if (oldInfo.getAccess() != newInfo.getAccess()) return true; if (oldInfo.getExceptions() == null || newInfo.getExceptions() == null) { if (oldInfo.getExceptions() != newInfo.getExceptions()) return true; } else { java.util.Set oldExceptions = new HashSet(Arrays.asList(oldInfo.getExceptions())); java.util.Set newExceptions = new HashSet(Arrays.asList(newInfo.getExceptions())); if (!oldExceptions.equals(newExceptions)) return true; } return false; } /** * Check if there is a change between two versions of a field. * Returns true if the access flags differ, or if the inital value * of the field differs. * * @param oldInfo Info about the old version of the field. * @param newInfo Info about the new version of the field. * @return True if the fields differ, false otherwise. */ public boolean differs(FieldInfo oldInfo, FieldInfo newInfo) { if (oldInfo.getAccess() != newInfo.getAccess()) return true; if (oldInfo.getValue() == null || newInfo.getValue() == null) { if (oldInfo.getValue() != newInfo.getValue()) return true; } else if (!oldInfo.getValue().equals(newInfo.getValue())) return true; return false; } } jardiff-0.2/src/java/org/osjava/jardiff/DOMDiffHandler.java100644 0 0 63050 10376451445 20704 0ustar 0 0 /* * org.osjava.jardiff.DOMDiffHandler * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/jardiff/src/ava/org/osjava/jardiff/DOMDiffHandler.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /* Not in 1.4.2 import javax.xml.XMLConstants; */ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.Result; import org.w3c.dom.*; import org.objectweb.asm.Type; /** * A specific type of DiffHandler which uses DOM to create an XML document * describing the changes in the diff. * * @author Antony Riley */ public class DOMDiffHandler implements DiffHandler { /** * The XML namespace used. */ public static final String XML_URI = "http://www.osjava.org/jardiff/0.1"; /** * The javax.xml.transform.sax.Transformer used to convert * the DOM to text. */ private final Transformer transformer; /** * Where we write the result to. */ private final Result result; /** * The document object we're building */ private final Document doc; /** * The current Node. */ private Node currentNode; /** * Create a new DOMDiffHandler which writes to System.out * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public DOMDiffHandler() throws DiffException { try { TransformerFactory tf = TransformerFactory.newInstance(); this.transformer = tf.newTransformer(); this.result = new StreamResult(System.out); this.currentNode = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); this.doc = db.newDocument(); } catch (TransformerConfigurationException tce) { throw new DiffException(tce); } catch (ParserConfigurationException pce) { throw new DiffException(pce); } } /** * Create a new DOMDiffHandler with the specified Transformer and Result. * This method allows the user to choose what they are going to do with * the output in a flexible manner, allowing a stylesheet to be specified * and some result object. * * @param transformer The transformer to transform the output with. * @param result Where to put the result. */ public DOMDiffHandler(Transformer transformer, Result result) throws DiffException { try { this.transformer = transformer; this.result = result; this.currentNode = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); this.doc = db.newDocument(); } catch (ParserConfigurationException pce) { throw new DiffException(pce); } } /** * Start the diff. * This writes out the start of a <diff> node. * * @param oldJar ignored * @param newJar ignored * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startDiff(String oldJar, String newJar) throws DiffException { Element tmp = doc.createElementNS(XML_URI, "diff"); tmp.setAttribute( "old", oldJar); tmp.setAttribute( "new", newJar); doc.appendChild(tmp); currentNode = tmp; } /** * Start the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startOldContents() throws DiffException { Element tmp = doc.createElementNS(XML_URI, "oldcontents"); currentNode.appendChild(tmp); currentNode = tmp; } /** * Start the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startNewContents() throws DiffException { Element tmp = doc.createElementNS(XML_URI, "newcontents"); currentNode.appendChild(tmp); currentNode = tmp; } /** * Add a contained class. * * @param info information about a class * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void contains(ClassInfo info) throws DiffException { Element tmp = doc.createElementNS(XML_URI, "class"); tmp.setAttribute("name", info.getName()); currentNode.appendChild(tmp); } /** * End the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endOldContents() throws DiffException { currentNode = currentNode.getParentNode(); } /** * End the list of new contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endNewContents() throws DiffException { currentNode = currentNode.getParentNode(); } /** * Start the removed node. * This writes out a <removed> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startRemoved() throws DiffException { Element tmp = doc.createElementNS(XML_URI, "removed"); currentNode.appendChild(tmp); currentNode = tmp; } /** * Write out class info for a removed class. * This writes out the nodes describing a class * * @param info The info to write out. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classRemoved(ClassInfo info) throws DiffException { writeClassInfo(info); } /** * End the removed section. * This closes the <removed> tag. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endRemoved() throws DiffException { currentNode = currentNode.getParentNode(); } /** * Start the added section. * This opens the <added> tag. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startAdded() throws DiffException { Element tmp = doc.createElementNS(XML_URI, "added"); currentNode.appendChild(tmp); currentNode = tmp; } /** * Write out the class info for an added class. * This writes out the nodes describing an added class. * * @param info The class info describing the added class. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classAdded(ClassInfo info) throws DiffException { writeClassInfo(info); } /** * End the added section. * This closes the <added> tag. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endAdded() throws DiffException { currentNode = currentNode.getParentNode(); } /** * Start the changed section. * This writes out the <changed> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startChanged() throws DiffException { Element tmp = doc.createElementNS(XML_URI, "changed"); currentNode.appendChild(tmp); currentNode = tmp; } /** * Start a changed section for an individual class. * This writes out an <classchanged> node with the real class * name as the name attribute. * * @param internalName the internal name of the class that has changed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startClassChanged(String internalName) throws DiffException { Element tmp = doc.createElementNS(XML_URI, "classchanged"); tmp.setAttribute( "name", internalName); currentNode.appendChild(tmp); currentNode = tmp; } /** * Write out info about a removed field. * This just writes out the field info, it will be inside a start/end * removed section. * * @param info Info about the field that's been removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldRemoved(FieldInfo info) throws DiffException { writeFieldInfo(info); } /** * Write out info about a removed method. * This just writes out the method info, it will be inside a start/end * removed section. * * @param info Info about the method that's been removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodRemoved(MethodInfo info) throws DiffException { writeMethodInfo(info); } /** * Write out info about an added field. * This just writes out the field info, it will be inside a start/end * added section. * * @param info Info about the added field. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldAdded(FieldInfo info) throws DiffException { writeFieldInfo(info); } /** * Write out info about a added method. * This just writes out the method info, it will be inside a start/end * added section. * * @param info Info about the added method. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodAdded(MethodInfo info) throws DiffException { writeMethodInfo(info); } /** * Write out info aboout a changed class. * This writes out a <classchange> node, followed by a * <from> node, with the old information about the class * followed by a <to> node with the new information about the * class. * * @param oldInfo Info about the old class. * @param newInfo Info about the new class. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classChanged(ClassInfo oldInfo, ClassInfo newInfo) throws DiffException { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "classchange"); Element from = doc.createElementNS(XML_URI, "from"); Element to = doc.createElementNS(XML_URI, "to"); tmp.appendChild(from); tmp.appendChild(to); currentNode.appendChild(tmp); this.currentNode = from; writeClassInfo(oldInfo); this.currentNode = to; writeClassInfo(newInfo); this.currentNode = currentNode; } /** * Write out info aboout a changed field. * This writes out a <fieldchange> node, followed by a * <from> node, with the old information about the field * followed by a <to> node with the new information about the * field. * * @param oldInfo Info about the old field. * @param newInfo Info about the new field. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldChanged(FieldInfo oldInfo, FieldInfo newInfo) throws DiffException { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "fieldchange"); Element from = doc.createElementNS(XML_URI, "from"); Element to = doc.createElementNS(XML_URI, "to"); tmp.appendChild(from); tmp.appendChild(to); currentNode.appendChild(tmp); this.currentNode = from; writeFieldInfo(oldInfo); this.currentNode = to; writeFieldInfo(newInfo); this.currentNode = currentNode; } /** * Write out info aboout a changed method. * This writes out a <methodchange> node, followed by a * <from> node, with the old information about the method * followed by a <to> node with the new information about the * method. * * @param oldInfo Info about the old method. * @param newInfo Info about the new method. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "methodchange"); Element from = doc.createElementNS(XML_URI, "from"); Element to = doc.createElementNS(XML_URI, "to"); tmp.appendChild(from); tmp.appendChild(to); currentNode.appendChild(tmp); this.currentNode = from; writeMethodInfo(oldInfo); this.currentNode = to; writeMethodInfo(newInfo); this.currentNode = currentNode; } /** * End the changed section for an individual class. * This closes the <classchanged> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endClassChanged() throws DiffException { currentNode = currentNode.getParentNode(); } /** * End the changed section. * This closes the <changed> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endChanged() throws DiffException { currentNode = currentNode.getParentNode(); } /** * End the diff. * This closes the <diff> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endDiff() throws DiffException { DOMSource source = new DOMSource(doc); try { transformer.transform(source, result); } catch (TransformerException te) { throw new DiffException(te); } } /** * Write out information about a class. * This writes out a <class> node, which contains information about * what interfaces are implemented each in a <implements> node. * * @param info Info about the class to write out. */ protected void writeClassInfo(ClassInfo info) { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "class"); currentNode.appendChild(tmp); this.currentNode = tmp; addAccessFlags(info); if (info.getName() != null) tmp.setAttribute( "name", info.getName()); if (info.getSignature() != null) tmp.setAttribute( "signature", info.getSignature()); if (info.getSupername() != null) tmp.setAttribute( "superclass", info.getSupername()); String[] interfaces = info.getInterfaces(); for (int i = 0; i < interfaces.length; i++) { Element iface = doc.createElementNS(XML_URI, "implements"); tmp.appendChild(iface); iface.setAttribute( "name", interfaces[i]); } this.currentNode = currentNode; } /** * Write out information about a method. * This writes out a <method> node which contains information about * the arguments, the return type, and the exceptions thrown by the * method. * * @param info Info about the method. */ protected void writeMethodInfo(MethodInfo info) { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "method"); currentNode.appendChild(tmp); this.currentNode = tmp; addAccessFlags(info); if (info.getName() != null) tmp.setAttribute( "name", info.getName()); if (info.getSignature() != null) tmp.setAttribute( "signature", info.getSignature()); if (info.getDesc() != null) addMethodNodes(info.getDesc()); String[] exceptions = info.getExceptions(); if (exceptions != null) { for (int i = 0; i < exceptions.length; i++) { Element excep = doc.createElementNS(XML_URI, "exception"); excep.setAttribute( "name", exceptions[i]); tmp.appendChild(excep); } } this.currentNode = currentNode; } /** * Write out information about a field. * This writes out a <field> node with attributes describing the * field. * * @param info Info about the field. */ protected void writeFieldInfo(FieldInfo info) { Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI, "field"); currentNode.appendChild(tmp); this.currentNode = tmp; addAccessFlags(info); if (info.getName() != null) tmp.setAttribute( "name", info.getName()); if (info.getSignature() != null) tmp.setAttribute( "signature", info.getSignature()); if (info.getValue() != null) tmp.setAttribute( "value", info.getValue().toString()); if (info.getDesc() != null) addTypeNode(info.getDesc()); this.currentNode = currentNode; } /** * Add attributes describing some access flags. * This adds the attributes to the attr field. * * @see #attr * @param info Info describing the access flags. */ protected void addAccessFlags(AbstractInfo info) { Element currentNode = (Element) this.currentNode; currentNode.setAttribute( "access", info.getAccessType()); if (info.isAbstract()) currentNode.setAttribute( "abstract", "yes"); if (info.isAnnotation()) currentNode.setAttribute( "annotation", "yes"); if (info.isBridge()) currentNode.setAttribute( "bridge", "yes"); if (info.isDeprecated()) currentNode.setAttribute( "deprecated", "yes"); if (info.isEnum()) currentNode.setAttribute( "enum", "yes"); if (info.isFinal()) currentNode.setAttribute( "final", "yes"); if (info.isInterface()) currentNode.setAttribute( "interface", "yes"); if (info.isNative()) currentNode.setAttribute( "native", "yes"); if (info.isStatic()) currentNode.setAttribute( "static", "yes"); if (info.isStrict()) currentNode.setAttribute( "strict", "yes"); if (info.isSuper()) currentNode.setAttribute( "super", "yes"); if (info.isSynchronized()) currentNode.setAttribute( "synchronized", "yes"); if (info.isSynthetic()) currentNode.setAttribute( "synthetic", "yes"); if (info.isTransient()) currentNode.setAttribute( "transient", "yes"); if (info.isVarargs()) currentNode.setAttribute( "varargs", "yes"); if (info.isVolatile()) currentNode.setAttribute( "volatile", "yes"); } /** * Add the method nodes for the method descriptor. * This writes out an <arguments> node containing the * argument types for the method, followed by a <return> node * containing the return type. * * @param desc The descriptor for the method to write out. */ protected void addMethodNodes(String desc) { Type[] args = Type.getArgumentTypes(desc); Type ret = Type.getReturnType(desc); Node currentNode = this.currentNode; Element tmp = doc.createElementNS(XML_URI,"arguments"); currentNode.appendChild(tmp); this.currentNode = tmp; for (int i = 0; i < args.length; i++) addTypeNode(args[i]); tmp = doc.createElementNS(XML_URI,"return"); currentNode.appendChild(tmp); this.currentNode = tmp; addTypeNode(ret); this.currentNode = currentNode; } /** * Add a type node for the specified descriptor. * * @param desc A type descriptor. */ protected void addTypeNode(String desc) { addTypeNode(Type.getType(desc)); } /** * Add a type node for the specified type. * This writes out a <type> node with attributes describing * the type. * * @param type The type to describe. */ protected void addTypeNode(Type type) { Element tmp = doc.createElementNS(XML_URI, "type"); currentNode.appendChild(tmp); int i = type.getSort(); if (i == Type.ARRAY) { tmp.setAttribute( "array", "yes"); tmp.setAttribute( "dimensions", "" + type.getDimensions()); type = type.getElementType(); i = type.getSort(); } switch (i) { case Type.BOOLEAN: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "boolean"); break; case Type.BYTE: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "byte"); break; case Type.CHAR: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "char"); break; case Type.DOUBLE: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "double"); break; case Type.FLOAT: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "float"); break; case Type.INT: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "int"); break; case Type.LONG: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "long"); break; case Type.OBJECT: tmp.setAttribute( "name", type.getInternalName()); break; case Type.SHORT: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "short"); break; case Type.VOID: tmp.setAttribute( "primitive", "yes"); tmp.setAttribute( "name", "void"); break; } } } jardiff-0.2/src/java/org/osjava/jardiff/ClassInfoVisitor.java100644 0 0 11504 10376451445 21434 0ustar 0 0 /* * org.osjava.jardiff.ClassInfoVisitor * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import java.util.HashMap; import java.util.Map; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.commons.EmptyVisitor; /** * A reusable class which uses the ASM to build up ClassInfo about a * java class file. * * @author Antony Riley */ public class ClassInfoVisitor extends EmptyVisitor { /** * The class file version. */ private int version; /** * The access flags for the class. */ private int access; /** * The internal name of the class. */ private String name; /** * The signature of the class */ private String signature; /** * The internal name of the superclass. */ private String supername; /** * An array of internal names of interfaces implemented by this class. */ private String[] interfaces; /** * A map of method signature to a MethodInfo describing the method. */ private Map methodMap; /** * A map of field signature to a FieldInfo describing the field. */ private Map fieldMap; /** * Reset this ClassInfoVisitor so that it can be used to visit another * class. */ public void reset() { methodMap = new HashMap(); fieldMap = new HashMap(); } /** * The the classInfo this ClassInfoVisitor has built up about a class */ public ClassInfo getClassInfo() { return new ClassInfo(version, access, name, signature, supername, interfaces, methodMap, fieldMap); } /** * Receive notification of information about a class from ASM. * * @param version the class file version number. * @param access the access flags for the class. * @param name the internal name of the class. * @param signature the signature of the class. * @param supername the internal name of the super class. * @param interfaces the internal names of interfaces implemented. */ public void visit(int version, int access, String name, String signature, String supername, String[] interfaces) { this.version = version; this.access = access; this.name = name; this.signature = signature; this.supername = supername; this.interfaces = interfaces; } public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { methodMap.put(name + desc, new MethodInfo(access, name, desc, signature, exceptions)); return null; } public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { fieldMap.put(name, new FieldInfo(access, name, desc, signature, value)); return this; } } jardiff-0.2/src/java/org/osjava/jardiff/ant/JDXSLTLiaison3.java100644 0 0 4705 10376451445 21354 0ustar 0 0 /* * org.osjava.jardiff.JDXSLTLiaison3 * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff.ant; import org.apache.tools.ant.taskdefs.XSLTLiaison2; /** * Extended proxy interface for XSLT processors. * * @see JDXSLTProcess * @since JarDiff 0.2 */ public interface JDXSLTLiaison3 extends XSLTLiaison2 { /** * Set the stylesheet to use for the transformation. * @param systemid the systemid of the stylesheet (a URL). * @throws Exception thrown if any problems happen * @since JarDiff 0.2 */ void setStylesheet(String systemid) throws Exception; /** * Configure the liaison from the XSLTProcess task. */ void configure(JDXSLTProcess process); } jardiff-0.2/src/java/org/osjava/jardiff/ant/JDXSLTProcess.java100644 0 0 103437 10376451445 21353 0ustar 0 0 /* * org.osjava.jardiff.JDXSLTProcess * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff.ant; import java.io.File; import java.util.Enumeration; import java.util.Vector; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.DynamicConfigurator; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Mapper; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; import org.apache.tools.ant.types.XMLCatalog; import org.apache.tools.ant.util.FileNameMapper; import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.taskdefs.MatchingTask; import org.apache.tools.ant.taskdefs.XSLTLiaison2; import org.apache.tools.ant.taskdefs.XSLTLiaison; import org.apache.tools.ant.taskdefs.XSLTLogger; import org.apache.tools.ant.taskdefs.XSLTLoggerAware; public class JDXSLTProcess extends MatchingTask implements XSLTLogger { /** destination directory */ private File destDir = null; /** where to find the source XML file, default is the project's basedir */ private File baseDir = null; /** XSL stylesheet */ private String xslFile = null; /** extension of the files produced by XSL processing */ private String targetExtension = ".html"; /** additional parameters to be passed to the stylesheets */ private Vector params = new Vector(); /** Input XML document to be used */ private File inFile = null; /** Output file */ private File outFile = null; /** The name of the XSL processor to use */ private String processor; /** Classpath to use when trying to load the XSL processor */ private Path classpath = null; /** * Systemid of stylesheet (url). */ // JARDIFF: Added private String styleurl = null; /** The Liason implementation to use to communicate with the XSL * processor */ private XSLTLiaison liaison; /** Flag which indicates if the stylesheet has been loaded into * the processor */ private boolean stylesheetLoaded = false; /** force output of target files even if they already exist */ private boolean force = false; /** Utilities used for file operations */ private FileUtils fileUtils; /** XSL output properties to be used */ private Vector outputProperties = new Vector(); /** for resolving entities such as dtds */ private XMLCatalog xmlCatalog = new XMLCatalog(); // JARDIFF: Modified. /** Name of the TRAX Liaison class */ private static final String TRAX_LIAISON_CLASS = "org.osjava.jardiff.ant.JDTraXLiaison"; /** Name of the now-deprecated XSLP Liaison class */ private static final String XSLP_LIAISON_CLASS = "org.apache.tools.ant.taskdefs.optional.XslpLiaison"; /** Name of the now-deprecated Xalan liaison class */ private static final String XALAN_LIAISON_CLASS = "org.apache.tools.ant.taskdefs.optional.XalanLiaison"; /** * Whether to style all files in the included directories as well. * * @since Ant 1.5 */ private boolean performDirectoryScan = true; /** * factory element for TraX processors only * @since Ant 1.6 */ private Factory factory = null; /** * whether to reuse Transformer if transforming multiple files. * @since 1.5.2 */ private boolean reuseLoadedStylesheet = true; /** * AntClassLoader for the nested <classpath> - if set. * *

We keep this here in order to reset the context classloader * in execute. We can't use liaison.getClass().getClassLoader() * since the actual liaison class may have been loaded by a loader * higher up (system classloader, for example).

* * @since Ant 1.6.2 */ private AntClassLoader loader = null; /** * Mapper to use when a set of files gets processed. * * @since Ant 1.6.2 */ private Mapper mapperElement = null; /** * Creates a new JDXSLTProcess Task. * @since JarDiff 0.2 */ // JARDIFF:Modified public JDXSLTProcess() { fileUtils = FileUtils.newFileUtils(); } //-- JDXSLTProcess /** * Whether to style all files in the included directories as well; * optional, default is true. * * @param b true if files in included directories are processed. * @since Ant 1.5 */ public void setScanIncludedDirectories(boolean b) { performDirectoryScan = b; } /** * Controls whether the stylesheet is reloaded for every transform. * *

Setting this to true may get around a bug in certain * Xalan-J versions, default is false.

* * @since Ant 1.5.2 */ public void setReloadStylesheet(boolean b) { reuseLoadedStylesheet = !b; } /** * Defines the mapper to map source to destination files. * @exception BuildException if more than one mapper is defined * @since Ant 1.6.2 */ public void addMapper(Mapper mapper) { if (mapperElement != null) { throw new BuildException("Cannot define more than one mapper", getLocation()); } mapperElement = mapper; } /** * Executes the task. * * @exception BuildException if there is an execution problem. * @todo validate that if either in or our is defined, then both are */ public void execute() throws BuildException { File savedBaseDir = baseDir; DirectoryScanner scanner; String[] list; String[] dirs; // JARDIFF: Added check if(xslFile != null && styleurl != null) { throw new BuildException( "cannot specify both styleurl and xslfile", getLocation() ); } // JARDIFF: modified if (xslFile == null && styleurl == null) { throw new BuildException("no stylesheet specified", getLocation()); } if (inFile != null && !inFile.exists()) { throw new BuildException("input file " + inFile.toString() + " does not exist", getLocation()); } try { if (baseDir == null) { baseDir = getProject().resolveFile("."); } liaison = getLiaison(); // JARDIFF: Added if(! (liaison instanceof JDXSLTLiaison3) && styleurl != null ) { throw new BuildException( "processor does not support style urls", getLocation() ); } // check if liaison wants to log errors using us as logger if (liaison instanceof XSLTLoggerAware) { ((XSLTLoggerAware) liaison).setLogger(this); } log("Using " + liaison.getClass().toString(), Project.MSG_VERBOSE); // JARDIFF: Modified. Object styleob; if(styleurl != null) { styleob = styleurl; } else { File stylesheet = getProject().resolveFile(xslFile); if (!stylesheet.exists()) { stylesheet = fileUtils.resolveFile(baseDir, xslFile); /* * shouldn't throw out deprecation warnings before we know, * the wrong version has been used. */ if (stylesheet.exists()) { log("DEPRECATED - the style attribute should be relative " + "to the project\'s"); log(" basedir, not the tasks\'s basedir."); } } styleob = stylesheet; } // if we have an in file and out then process them if (inFile != null && outFile != null) { process(inFile, outFile, styleob); return; } /* * if we get here, in and out have not been specified, we are * in batch processing mode. */ //-- make sure Source directory exists... if (destDir == null) { String msg = "destdir attributes must be set!"; throw new BuildException(msg); } scanner = getDirectoryScanner(baseDir); log("Transforming into " + destDir, Project.MSG_INFO); // Process all the files marked for styling list = scanner.getIncludedFiles(); for (int i = 0; i < list.length; ++i) { process(baseDir, list[i], destDir, styleob); } if (performDirectoryScan) { // Process all the directories marked for styling dirs = scanner.getIncludedDirectories(); for (int j = 0; j < dirs.length; ++j) { list = new File(baseDir, dirs[j]).list(); for (int i = 0; i < list.length; ++i) { process(baseDir, dirs[j] + File.separator + list[i], destDir, styleob); } } } } finally { if (loader != null) { loader.resetThreadContextLoader(); loader = null; } liaison = null; stylesheetLoaded = false; baseDir = savedBaseDir; } } /** * Set whether to check dependencies, or always generate; * optional, default is false. * * @param force true if always generate. */ public void setForce(boolean force) { this.force = force; } /** * Set the base directory; * optional, default is the project's basedir. * * @param dir the base directory **/ public void setBasedir(File dir) { baseDir = dir; } /** * Set the destination directory into which the XSL result * files should be copied to; * required, unless in and out are * specified. * @param dir the name of the destination directory **/ public void setDestdir(File dir) { destDir = dir; } /** * Set the desired file extension to be used for the target; * optional, default is html. * @param name the extension to use **/ public void setExtension(String name) { targetExtension = name; } /** * Name of the stylesheet to use - given either relative * to the project's basedir or as an absolute path; required. * * @param xslFile the stylesheet to use */ public void setStyle(String xslFile) { this.xslFile = xslFile; } /** * Set the optional classpath to the XSL processor * * @param classpath the classpath to use when loading the XSL processor */ public void setClasspath(Path classpath) { createClasspath().append(classpath); } /** * Set the optional classpath to the XSL processor * * @return a path instance to be configured by the Ant core. */ public Path createClasspath() { if (classpath == null) { classpath = new Path(getProject()); } return classpath.createPath(); } /** * Set the reference to an optional classpath to the XSL processor * * @param r the id of the Ant path instance to act as the classpath * for loading the XSL processor */ public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } /** * Set the name of the XSL processor to use; optional, default trax. * Other values are "xalan" for Xalan1 and "xslp" for XSL:P, though the * later is strongly deprecated. * * @param processor the name of the XSL processor */ public void setProcessor(String processor) { this.processor = processor; } /** * Set the stylesheet url. * * @since JarDiff 0.2 */ public void setStyleurl(String styleurl) { this.styleurl = styleurl; } /** * Add the catalog to our internal catalog * * @param xmlCatalog the XMLCatalog instance to use to look up DTDs */ public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) { this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog); } /** * Load processor here instead of in setProcessor - this will be * called from within execute, so we have access to the latest * classpath. * * @param proc the name of the processor to load. * @exception Exception if the processor cannot be loaded. */ private void resolveProcessor(String proc) throws Exception { if (proc.equals("trax")) { final Class clazz = loadClass(TRAX_LIAISON_CLASS); liaison = (XSLTLiaison) clazz.newInstance(); } else if (proc.equals("xslp")) { log("DEPRECATED - xslp processor is deprecated. Use trax " + "instead."); final Class clazz = loadClass(XSLP_LIAISON_CLASS); liaison = (XSLTLiaison) clazz.newInstance(); } else if (proc.equals("xalan")) { log("DEPRECATED - xalan processor is deprecated. Use trax " + "instead."); final Class clazz = loadClass(XALAN_LIAISON_CLASS); liaison = (XSLTLiaison) clazz.newInstance(); } else { liaison = (XSLTLiaison) loadClass(proc).newInstance(); } } /** * Load named class either via the system classloader or a given * custom classloader. * * @param classname the name of the class to load. * @return the requested class. * @exception Exception if the class could not be loaded. */ private Class loadClass(String classname) throws Exception { if (classpath == null) { return Class.forName(classname); } else { loader = getProject().createClassLoader(classpath); loader.setThreadContextLoader(); Class c = Class.forName(classname, true, loader); return c; } } /** * Specifies the output name for the styled result from the * in attribute; required if in is set * * @param outFile the output File instance. */ public void setOut(File outFile) { this.outFile = outFile; } /** * specifies a single XML document to be styled. Should be used * with the out attribute; ; required if out is set * * @param inFile the input file */ public void setIn(File inFile) { this.inFile = inFile; } /** * Processes the given input XML file and stores the result * in the given resultFile. * * @param baseDir the base directory for resolving files. * @param xmlFile the input file * @param destDir the destination directory * @param stylesheet the stylesheet to use. * @exception BuildException if the processing fails. */ private void process(File baseDir, String xmlFile, File destDir, Object stylesheet) throws BuildException { File outFile = null; File inFile = null; try { long styleSheetLastModified = 0L; // JARDIFF: Added if(stylesheet instanceof File) { styleSheetLastModified = ( (File)stylesheet ).lastModified(); } inFile = new File(baseDir, xmlFile); if (inFile.isDirectory()) { log("Skipping " + inFile + " it is a directory.", Project.MSG_VERBOSE); return; } FileNameMapper mapper = null; if (mapperElement != null) { mapper = mapperElement.getImplementation(); } else { mapper = new StyleMapper(); } String[] outFileName = mapper.mapFileName(xmlFile); if (outFileName == null || outFileName.length == 0) { log("Skipping " + inFile + " it cannot get mapped to output.", Project.MSG_VERBOSE); return; } else if (outFileName == null || outFileName.length > 1) { log("Skipping " + inFile + " its mapping is ambiguos.", Project.MSG_VERBOSE); return; } outFile = new File(destDir, outFileName[0]); if (force || inFile.lastModified() > outFile.lastModified() || styleSheetLastModified > outFile.lastModified()) { ensureDirectoryFor(outFile); log("Processing " + inFile + " to " + outFile); configureLiaison(stylesheet); liaison.transform(inFile, outFile); } } catch (Exception ex) { // If failed to process document, must delete target document, // or it will not attempt to process it the second time log("Failed to process " + inFile, Project.MSG_INFO); if (outFile != null) { outFile.delete(); } throw new BuildException(ex); } } //-- processXML /** * Process the input file to the output file with the given stylesheet. * * @param inFile the input file to process. * @param outFile the destination file. * @param stylesheet the stylesheet to use. * @exception BuildException if the processing fails. */ private void process(File inFile, File outFile, Object stylesheet) throws BuildException { try { long styleSheetLastModified = 0L; // JARDIFF: Added if(stylesheet instanceof File) { styleSheetLastModified = ( (File)stylesheet ).lastModified(); } log("In file " + inFile + " time: " + inFile.lastModified(), Project.MSG_DEBUG); log("Out file " + outFile + " time: " + outFile.lastModified(), Project.MSG_DEBUG); log("Style file " + xslFile + " time: " + styleSheetLastModified, Project.MSG_DEBUG); if (force || inFile.lastModified() >= outFile.lastModified() || styleSheetLastModified >= outFile.lastModified()) { ensureDirectoryFor(outFile); log("Processing " + inFile + " to " + outFile, Project.MSG_INFO); configureLiaison(stylesheet); liaison.transform(inFile, outFile); } else { log("Skipping input file " + inFile + " because it is older than output file " + outFile + " and so is the stylesheet " + stylesheet, Project.MSG_DEBUG); } } catch (Exception ex) { log("Failed to process " + inFile, Project.MSG_INFO); if (outFile != null) { outFile.delete(); } throw new BuildException(ex); } } /** * Ensure the directory exists for a given file * * @param targetFile the file for which the directories are required. * @exception BuildException if the directories cannot be created. */ private void ensureDirectoryFor(File targetFile) throws BuildException { File directory = fileUtils.getParentFile(targetFile); if (!directory.exists()) { if (!directory.mkdirs()) { throw new BuildException("Unable to create directory: " + directory.getAbsolutePath()); } } } /** * Get the factory instance configured for this processor * * @return the factory instance in use */ public Factory getFactory() { return factory; } /** * Get the XML catalog containing entity definitions * * @return the XML catalog for the task. */ public XMLCatalog getXMLCatalog() { return xmlCatalog; } public Enumeration getOutputProperties() { return outputProperties.elements(); } /** * Get the Liason implementation to use in processing. * * @return an instance of the XSLTLiason interface. */ protected XSLTLiaison getLiaison() { // if processor wasn't specified, see if TraX is available. If not, // default it to xslp or xalan, depending on which is in the classpath if (liaison == null) { if (processor != null) { try { resolveProcessor(processor); } catch (Exception e) { throw new BuildException(e); } } else { try { resolveProcessor("trax"); } catch (Throwable e1) { try { resolveProcessor("xalan"); } catch (Throwable e2) { try { resolveProcessor("xslp"); } catch (Throwable e3) { e3.printStackTrace(); e2.printStackTrace(); throw new BuildException(e1); } } } } } return liaison; } /** * Create an instance of an XSL parameter for configuration by Ant. * * @return an instance of the Param class to be configured. */ public Param createParam() { Param p = new Param(); params.addElement(p); return p; } /** * The Param inner class used to store XSL parameters */ public static class Param { /** The parameter name */ private String name = null; /** The parameter's value */ private String expression = null; private String ifProperty; private String unlessProperty; private Project project; /** * Set the current project * * @param project the current project */ public void setProject(Project project) { this.project = project; } /** * Set the parameter name. * * @param name the name of the parameter. */ public void setName(String name) { this.name = name; } /** * The parameter value * NOTE : was intended to be an XSL expression. * @param expression the parameter's value. */ public void setExpression(String expression) { this.expression = expression; } /** * Get the parameter name * * @return the parameter name * @exception BuildException if the name is not set. */ public String getName() throws BuildException { if (name == null) { throw new BuildException("Name attribute is missing."); } return name; } /** * Get the parameter's value * * @return the parameter value * @exception BuildException if the value is not set. */ public String getExpression() throws BuildException { if (expression == null) { throw new BuildException("Expression attribute is missing."); } return expression; } /** * Set whether this param should be used. It will be * used if the property has been set, otherwise it won't. * @param ifProperty name of property */ public void setIf(String ifProperty) { this.ifProperty = ifProperty; } /** * Set whether this param should NOT be used. It * will not be used if the property has been set, otherwise it * will be used. * @param unlessProperty name of property */ public void setUnless(String unlessProperty) { this.unlessProperty = unlessProperty; } /** * Ensures that the param passes the conditions placed * on it with if and unless properties. */ public boolean shouldUse() { if (ifProperty != null && project.getProperty(ifProperty) == null) { return false; } else if (unlessProperty != null && project.getProperty(unlessProperty) != null) { return false; } return true; } } // Param /** * Create an instance of an output property to be configured. * @return the newly created output property. * @since Ant 1.5 */ public OutputProperty createOutputProperty() { OutputProperty p = new OutputProperty(); outputProperties.addElement(p); return p; } /** * Specify how the result tree should be output as specified * in the * specification. * @since Ant 1.5 */ public static class OutputProperty { /** output property name */ private String name; /** output property value */ private String value; /** * @return the output property name. */ public String getName() { return name; } /** * set the name for this property * @param name A non-null String that specifies an * output property name, which may be namespace qualified. */ public void setName(String name) { this.name = name; } /** * @return the output property value. */ public String getValue() { return value; } /** * set the value for this property * @param value The non-null string value of the output property. */ public void setValue(String value) { this.value = value; } } /** * Initialize internal instance of XMLCatalog */ public void init() throws BuildException { super.init(); xmlCatalog.setProject(getProject()); } /** * Loads the stylesheet and set xsl:param parameters. * * @param stylesheet the file form which to load the stylesheet. * @exception BuildException if the stylesheet cannot be loaded. */ protected void configureLiaison(Object stylesheet) throws BuildException { if (stylesheetLoaded && reuseLoadedStylesheet) { return; } stylesheetLoaded = true; try { log("Loading stylesheet " + stylesheet, Project.MSG_INFO); // JARDIFF: ADDED if(stylesheet instanceof File) { liaison.setStylesheet((File) stylesheet); } else { if(liaison instanceof JDXSLTLiaison3) { ((JDXSLTLiaison3)liaison). setStylesheet((String) stylesheet); } else { String msg = "liaison does not support stylesheet urls"; throw new BuildException(msg, getLocation()); } } for (Enumeration e = params.elements(); e.hasMoreElements();) { Param p = (Param) e.nextElement(); if (p.shouldUse()) { liaison.addParam(p.getName(), p.getExpression()); } } // JARDIFF: Modified (nasty workaround) if (liaison instanceof JDXSLTLiaison3) { ((JDXSLTLiaison3) liaison).configure(this); } } catch (Exception ex) { log("Failed to transform using stylesheet " + stylesheet, Project.MSG_INFO); throw new BuildException(ex); } } /** * Create the factory element to configure a trax liaison. * @return the newly created factory element. * @throws BuildException if the element is created more than one time. */ public Factory createFactory() throws BuildException { if (factory != null) { throw new BuildException("'factory' element must be unique"); } factory = new Factory(); return factory; } /** * The factory element to configure a transformer factory * @since Ant 1.6 */ public static class Factory { /** the factory class name to use for TraXLiaison */ private String name; /** * the list of factory attributes to use for TraXLiaison */ private Vector attributes = new Vector(); /** * @return the name of the factory. */ public String getName() { return name; } /** * Set the name of the factory * @param name the name of the factory. */ public void setName(String name) { this.name = name; } /** * Create an instance of a factory attribute. * the newly created factory attribute */ public void addAttribute(Attribute attr) { attributes.addElement(attr); } /** * return the attribute elements. * @return the enumeration of attributes */ public Enumeration getAttributes() { return attributes.elements(); } /** * A JAXP factory attribute. This is mostly processor specific, for * example for Xalan 2.3+, the following attributes could be set: *
    *
  • http://xml.apache.org/xalan/features/optimize (true|false)
  • *
  • http://xml.apache.org/xalan/features/incremental (true|false)
  • *
*/ public static class Attribute implements DynamicConfigurator { /** attribute name, mostly processor specific */ private String name; /** attribute value, often a boolean string */ private Object value; /** * @return the attribute name. */ public String getName() { return name; } /** * @return the output property value. */ public Object getValue() { return value; } public Object createDynamicElement(String name) throws BuildException { return null; } public void setDynamicAttribute(String name, String value) throws BuildException { // only 'name' and 'value' exist. if ("name".equalsIgnoreCase(name)) { this.name = value; } else if ("value".equalsIgnoreCase(name)) { // a value must be of a given type // say boolean|integer|string that are mostly used. if ("true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value)) { this.value = new Boolean(value); } else { try { this.value = new Integer(value); } catch (NumberFormatException e) { this.value = value; } } } else { throw new BuildException("Unsupported attribute: " + name); } } } // -- class Attribute } // -- class Factory /** * Mapper implementation of the "traditional" way <xslt> * mapped filenames. * *

If the file has an extension, chop it off. Append whatever * the user has specified as extension or ".html".

* * @since Ant 1.6.2 */ private class StyleMapper implements FileNameMapper { public void setFrom(String from) {} public void setTo(String to) {} public String[] mapFileName(String xmlFile) { int dotPos = xmlFile.lastIndexOf('.'); if (dotPos > 0) { xmlFile = xmlFile.substring(0, dotPos); } return new String[] {xmlFile + targetExtension}; } } } jardiff-0.2/src/java/org/osjava/jardiff/ant/JarDiffTask.java100644 0 0 16334 10376451445 21113 0ustar 0 0 /* * org.osjava.jardiff.ant.JarDiffTask * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff.ant; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.URL; import java.util.Set; import java.util.HashSet; import javax.xml.transform.ErrorListener; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.osjava.jardiff.JarDiff; import org.osjava.jardiff.DiffException; import org.osjava.jardiff.StreamDiffHandler; import org.osjava.jardiff.SimpleDiffCriteria; /** * Process two jarfiles generating a public API difference report. * This is useful for keeping track of API changes between versions of a * project. * * @author Antony Riley */ public class JarDiffTask extends Task { /** * The jarfile this diff is from. */ private File fromJar = null; /** * The jarfile this diff is to. */ private File toJar = null; /** * The file to write the report to. */ private File out = null; /** * The name to use for the from version. */ private String fromName = null; /** * The name to use for the to verison. */ private String toName = null; /** * Force output, even if the existing output is newer than * the jar files. */ private boolean force = false; /** * Run the task, generating the jardiff report. * * @throws BuildException When there is an error creating the diff, * When there is a problem with the xml parser, * When there is a problem with the xslt transformer * When the attributes specified are invalid. */ public void execute() throws BuildException { try { if(fromJar == null) { throw new BuildException("no fromjar file specified", getLocation()); } if(toJar == null) { throw new BuildException("no tojar file specified", getLocation()); } if(out == null) { throw new BuildException("no out file specified", getLocation()); } if(fromName == null) { fromName = fromJar.getName(); } if(toName == null) { toName = toJar.getName(); } if(!fromJar.exists() || !fromJar.isFile() || !fromJar.canRead()) { String msg = "fromjar is not a file, or cannot be read"; throw new BuildException(msg, getLocation()); } if(!toJar.exists() || !toJar.isFile() || !toJar.canRead()) { String msg = "tojar is not a file, or cannot be read"; throw new BuildException(msg, getLocation()); } long outModified = out.lastModified(); long oldModified = fromJar.lastModified(); long newModified = toJar.lastModified(); if(force || oldModified > outModified || newModified > outModified) { log("Writing xml api diff to "+out); JarDiff jd = new JarDiff(); jd.setOldVersion(fromName); jd.setNewVersion(toName); jd.loadOldClasses(fromJar); jd.loadNewClasses(toJar); jd.diff( new StreamDiffHandler(new FileOutputStream(out)), new SimpleDiffCriteria() ); } } catch (DiffException de) { throw new BuildException(de); } catch (IOException ioe) { throw new BuildException(ioe); } } /** * Set the from jar file. * Required attribute. * * @param fromJar a jar file. */ public void setFromjar(File fromJar) { this.fromJar = fromJar; } /** * Set the to jar file. * Required attribute. * @param toJar a jar file. */ public void setTojar(File toJar) { this.toJar = toJar; } /** * Set the out file. * Required attribute. * * @param out an output file. */ public void setOut(File out) { this.out = out; } /** * Set the from jar visible name. * Optional attribute. * Defaults to the filename of fromjar. * * @param fromName a visible name. */ public void setFromname(String fromName) { this.fromName = fromName; } /** * Set the to jar visible name. * Optional attribute. * Defaults to the filename of tojar. * * @param toName a visible name. */ public void setToname(String toName) { this.toName = toName; } /** * Force output even if there is an existing diff file which is * newer than the source jar files. * Optional attribute. * Defaults to false. * * @param force true to force output, false otherwise */ public void setForce(boolean force) { this.force = force; } } jardiff-0.2/src/java/org/osjava/jardiff/ant/JDTraXLiaison.java100644 0 0 44362 10376451445 21400 0ustar 0 0 /* * org.osjava.jardiff.ant.JDTraXLiaison * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff.ant; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.util.Vector; import java.util.Enumeration; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.ErrorListener; import javax.xml.transform.Source; import javax.xml.transform.SourceLocator; import javax.xml.transform.Templates; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.URIResolver; import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.TransformerConfigurationException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.XSLTLiaison2; import org.apache.tools.ant.taskdefs.XSLTProcess; import org.apache.tools.ant.taskdefs.XSLTLogger; import org.apache.tools.ant.taskdefs.XSLTLoggerAware; import org.apache.tools.ant.types.XMLCatalog; import org.apache.tools.ant.util.JAXPUtils; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; /* JarDiff modifications of Ant class anotated with // JARDIFF */ /** * Custom TraX liaison class. * * This allows loading a stylesheet from a systemid (URL). */ public class JDTraXLiaison implements JDXSLTLiaison3, ErrorListener, XSLTLoggerAware { /** * The systemid of the stylesheet (a URL). */ private String systemid; // JARDIFF: Added. /** * Create a new JDTraXLiaison. */ // JARDIFF: Modified constructor name. public JDTraXLiaison() throws Exception { } /** * the name of the factory implementation class to use * or null for default JAXP lookup. */ private String factoryName = null; /** The trax TransformerFactory */ private TransformerFactory tfactory = null; /** stylesheet to use for transformation */ private File stylesheet; private XSLTLogger logger; /** possible resolver for publicIds */ private EntityResolver entityResolver; /** transformer to use for processing files */ private Transformer transformer; /** The In memory version of the stylesheet */ private Templates templates; /** * The modification time of the stylesheet from which the templates * are read */ private long templatesModTime; /** possible resolver for URIs */ private URIResolver uriResolver; /** transformer output properties */ private Vector outputProperties = new Vector(); /** stylesheet parameters */ private Vector params = new Vector(); /** factory attributes */ private Vector attributes = new Vector(); // JARDIFF: Added Method. public void setStylesheet(String systemid) { if(this.systemid != null) { transformer = null; // Can't check mod time on URLs if(this.systemid.equals(systemid)) { templates = null; } } this.systemid = systemid; this.stylesheet = null; } public void setStylesheet(File stylesheet) throws Exception { if (this.stylesheet != null) { // resetting the stylesheet - reset transformer transformer = null; // do we need to reset templates as well if (!this.stylesheet.equals(stylesheet) || (stylesheet.lastModified() != templatesModTime)) { templates = null; } } this.stylesheet = stylesheet; // JARDIFF: Added next line. this.systemid = stylesheet.toURL().toString(); } public void transform(File infile, File outfile) throws Exception { if (transformer == null) { createTransformer(); } InputStream fis = null; OutputStream fos = null; try { fis = new BufferedInputStream(new FileInputStream(infile)); fos = new BufferedOutputStream(new FileOutputStream(outfile)); StreamResult res = new StreamResult(fos); // not sure what could be the need of this... res.setSystemId(JAXPUtils.getSystemId(outfile)); Source src = getSource(fis, infile); transformer.transform(src, res); } finally { // make sure to close all handles, otherwise the garbage // collector will close them...whenever possible and // Windows may complain about not being able to delete files. try { if (fis != null) { fis.close(); } } catch (IOException ignored) { // ignore } try { if (fos != null) { fos.close(); } } catch (IOException ignored) { // ignore } } } /** * Get the source instance from the stream and id of the file. * @param is the stream containing the stylesheet data. * @param infile the file that will be used for the systemid. * @return the configured source instance matching the stylesheet. * @throws Exception if there is a problem creating the source. */ // JARDIFF: Added for compatability. private Source getSource(InputStream is, File infile) throws ParserConfigurationException, SAXException { return getSource(is, JAXPUtils.getSystemId(infile)); } // JARDIFF: Modified method parameters private Source getSource(InputStream is, String systemid) throws ParserConfigurationException, SAXException { // todo: is this comment still relevant ?? // FIXME: need to use a SAXSource as the source for the transform // so we can plug in our own entity resolver Source src = null; if (entityResolver != null) { if (getFactory().getFeature(SAXSource.FEATURE)) { SAXParserFactory spFactory = SAXParserFactory.newInstance(); spFactory.setNamespaceAware(true); XMLReader reader = spFactory.newSAXParser().getXMLReader(); reader.setEntityResolver(entityResolver); src = new SAXSource(reader, new InputSource(is)); } else { throw new IllegalStateException("xcatalog specified, but " + "parser doesn't support SAX"); } } else { // WARN: Don't use the StreamSource(File) ctor. It won't work with // xalan prior to 2.2 because of systemid bugs. src = new StreamSource(is); } // JARDIFF: Modified (moved to overloaded method variant). src.setSystemId(systemid); return src; } /** * Read in templates from the stylesheet */ private void readTemplates() throws IOException, TransformerConfigurationException, ParserConfigurationException, SAXException { // Use a stream so that you can close it yourself quickly // and avoid keeping the handle until the object is garbaged. // (always keep control), otherwise you won't be able to delete // the file quickly on windows. InputStream xslStream = null; try { // JARDIFF: Largely modified. if(stylesheet != null) { xslStream = new BufferedInputStream(new FileInputStream(stylesheet)); templatesModTime = stylesheet.lastModified(); } else { xslStream = new URL(systemid).openStream(); templatesModTime = 0L; } Source src = getSource(xslStream, systemid); templates = getFactory().newTemplates(src); } finally { if(xslStream != null) { xslStream.close(); } } } /** * Create a new transformer based on the liaison settings * @return the newly created and configured transformer. * @throws Exception thrown if there is an error during creation. * @see #setStylesheet(java.io.File) * @see #addParam(java.lang.String, java.lang.String) * @see #setOutputProperty(java.lang.String, java.lang.String) */ private void createTransformer() throws Exception { if (templates == null) { readTemplates(); } transformer = templates.newTransformer(); // configure the transformer... transformer.setErrorListener(this); if (uriResolver != null) { transformer.setURIResolver(uriResolver); } for (int i = 0; i < params.size(); i++) { final String[] pair = (String[]) params.elementAt(i); transformer.setParameter(pair[0], pair[1]); } for (int i = 0; i < outputProperties.size(); i++) { final String[] pair = (String[]) outputProperties.elementAt(i); transformer.setOutputProperty(pair[0], pair[1]); } } /** * return the Transformer factory associated to this liaison. * @return the Transformer factory associated to this liaison. * @throws BuildException thrown if there is a problem creating * the factory. * @see #setFactory(String) * @since Ant 1.5.2 */ private TransformerFactory getFactory() throws BuildException { if (tfactory != null) { return tfactory; } // not initialized yet, so create the factory if (factoryName == null) { tfactory = TransformerFactory.newInstance(); } else { try { Class clazz = Class.forName(factoryName); tfactory = (TransformerFactory) clazz.newInstance(); } catch (Exception e) { throw new BuildException(e); } } tfactory.setErrorListener(this); // specific attributes for the transformer for (int i = 0; i < attributes.size(); i++) { final Object[] pair = (Object[]) attributes.elementAt(i); tfactory.setAttribute((String) pair[0], pair[1]); } if (uriResolver != null) { tfactory.setURIResolver(uriResolver); } return tfactory; } /** * Set the factory name to use instead of JAXP default lookup. * @param name the fully qualified class name of the factory to use * or null for the default JAXP look up mechanism. * @since Ant 1.6 */ public void setFactory(String name) { factoryName = name; } /** * Set a custom attribute for the JAXP factory implementation. * @param name the attribute name. * @param value the value of the attribute, usually a boolean * string or object. * @since Ant 1.6 */ public void setAttribute(String name, Object value) { final Object[] pair = new Object[]{name, value}; attributes.addElement(pair); } /** * Set the output property for the current transformer. * Note that the stylesheet must be set prior to calling * this method. * @param name the output property name. * @param value the output property value. * @since Ant 1.5 * @since Ant 1.5 */ public void setOutputProperty(String name, String value) { final String[] pair = new String[]{name, value}; outputProperties.addElement(pair); } /** Set the class to resolve entities during the transformation */ public void setEntityResolver(EntityResolver aResolver) { entityResolver = aResolver; } /** Set the class to resolve URIs during the transformation */ public void setURIResolver(URIResolver aResolver) { uriResolver = aResolver; } public void addParam(String name, String value) { final String[] pair = new String[]{name, value}; params.addElement(pair); } public void setLogger(XSLTLogger l) { logger = l; } public void error(TransformerException e) { logError(e, "Error"); } public void fatalError(TransformerException e) { logError(e, "Fatal Error"); throw new BuildException("Fatal error during transformation", e); } public void warning(TransformerException e) { logError(e, "Warning"); } private void logError(TransformerException e, String type) { if (logger == null) { return; } StringBuffer msg = new StringBuffer(); SourceLocator locator = e.getLocator(); if (locator != null) { String systemid = locator.getSystemId(); if (systemid != null) { String url = systemid; if (url.startsWith("file:///")) { url = url.substring(8); } msg.append(url); } else { msg.append("Unknown file"); } int line = locator.getLineNumber(); if (line != -1) { msg.append(":" + line); int column = locator.getColumnNumber(); if (column != -1) { msg.append(":" + column); } } } msg.append(": " + type + "! "); msg.append(e.getMessage()); if (e.getCause() != null) { msg.append(" Cause: " + e.getCause()); } logger.log(msg.toString()); } // kept for backwards compatibility /** * @deprecated use org.apache.tools.ant.util.JAXPUtils#getSystemId instead */ protected String getSystemId(File file) { return JAXPUtils.getSystemId(file); } /** * Specific configuration for the TRaX liaison. * @param xsltTask the XSLTProcess task instance from which this liasion * is to be configured. */ public void configure(XSLTProcess xsltTask) { XSLTProcess.Factory factory = xsltTask.getFactory(); if (factory != null) { setFactory(factory.getName()); // configure factory attributes for (Enumeration attrs = factory.getAttributes(); attrs.hasMoreElements();) { XSLTProcess.Factory.Attribute attr = (XSLTProcess.Factory.Attribute) attrs.nextElement(); setAttribute(attr.getName(), attr.getValue()); } } XMLCatalog xmlCatalog = xsltTask.getXMLCatalog(); // use XMLCatalog as the entity resolver and URI resolver if (xmlCatalog != null) { setEntityResolver(xmlCatalog); setURIResolver(xmlCatalog); } // configure output properties for (Enumeration props = xsltTask.getOutputProperties(); props.hasMoreElements();) { XSLTProcess.OutputProperty prop = (XSLTProcess.OutputProperty) props.nextElement(); setOutputProperty(prop.getName(), prop.getValue()); } } /** * Specific configuration for the TRaX liaison. * @param xsltTask the XSLTProcess task instance from which this liasion * is to be configured. */ // JARDIFF: Added public void configure(JDXSLTProcess xsltTask) { JDXSLTProcess.Factory factory = xsltTask.getFactory(); if (factory != null) { setFactory(factory.getName()); // configure factory attributes for (Enumeration attrs = factory.getAttributes(); attrs.hasMoreElements();) { JDXSLTProcess.Factory.Attribute attr = (JDXSLTProcess.Factory.Attribute) attrs.nextElement(); setAttribute(attr.getName(), attr.getValue()); } } XMLCatalog xmlCatalog = xsltTask.getXMLCatalog(); // use XMLCatalog as the entity resolver and URI resolver if (xmlCatalog != null) { setEntityResolver(xmlCatalog); setURIResolver(xmlCatalog); } // configure output properties for (Enumeration props = xsltTask.getOutputProperties(); props.hasMoreElements();) { JDXSLTProcess.OutputProperty prop = (JDXSLTProcess.OutputProperty) props.nextElement(); setOutputProperty(prop.getName(), prop.getValue()); } } } jardiff-0.2/src/java/org/osjava/jardiff/MethodInfo.java100644 0 0 6607 10376451445 20217 0ustar 0 0 /* * org.osjava.jardiff.MethodInfo * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * A class to hold information about a method. * * @author Antony Riley */ public final class MethodInfo extends AbstractInfo { /** * The method descriptor. */ private String desc; /** * The signature of the method. */ private String signature; /** * An array of the exceptions thrown by this method. */ private String[] exceptions; /** * Create a new MethodInfo with the specified parameters. * * @param access The access flags for the method. * @param name The name of the method. * @param signature The signature of the method. * @param exceptions The exceptions thrown by the method. */ public MethodInfo(int access, String name, String desc, String signature, String[] exceptions) { super(access, name); this.desc = desc; this.signature = signature; this.exceptions = exceptions; } /** * Get the descriptor for the method. * * @return the descriptor */ public final String getDesc() { return desc; } /** * Get the signature for the method. * * @return the signature */ public final String getSignature() { return signature; } /** * Get the array of exceptions which can be thrown by the method. * * @return the exceptions as a String[] of internal names. */ public final String[] getExceptions() { return exceptions; } } jardiff-0.2/src/java/org/osjava/jardiff/StreamDiffHandler.java100644 0 0 63137 10376451445 21526 0ustar 0 0 /* * org.osjava.jardiff.StreamDiffHandler * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/jardiff/src/ava/org/osjava/jardiff/DOMDiffHandler.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import java.io.BufferedOutputStream; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import org.objectweb.asm.Type; /** * 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. * * @author Antony Riley */ public class StreamDiffHandler implements DiffHandler { /** * The XML namespace used. */ public static final String XML_URI = "http://www.osjava.org/jardiff/0.1"; /** * The javax.xml.transform.sax.Transformer used to convert * the DOM to text. */ private final BufferedWriter out; /** * Create a new StreamDiffHandler which writes to System.out * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public StreamDiffHandler() throws DiffException { try { out = new BufferedWriter( new OutputStreamWriter(System.out, "UTF-8") ); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Create a new StreamDiffHandler with the specified OutputStream. * * @param out Where to write output. */ public StreamDiffHandler(OutputStream out) throws DiffException { try { this.out = new BufferedWriter( new OutputStreamWriter(out, "UTF-8") ); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start the diff. * This writes out the start of a <diff> node. * * @param oldJar name of old jar file. * @param newJar name of new jar file. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startDiff(String oldJar, String newJar) throws DiffException { try { out.write(""); out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startOldContents() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startNewContents() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Add a contained class. * * @param info information about a class * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void contains(ClassInfo info) throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endOldContents() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the list of new contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endNewContents() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start the removed node. * This writes out a <removed> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startRemoved() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out class info for a removed class. * This writes out the nodes describing a class * * @param info The info to write out. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classRemoved(ClassInfo info) throws DiffException { try { writeClassInfo(info); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the removed section. * This closes the <removed> tag. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endRemoved() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start the added section. * This opens the <added> tag. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startAdded() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out the class info for an added class. * This writes out the nodes describing an added class. * * @param info The class info describing the added class. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classAdded(ClassInfo info) throws DiffException { try { writeClassInfo(info); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the added section. * This closes the <added> tag. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endAdded() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start the changed section. * This writes out the <changed> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startChanged() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Start a changed section for an individual class. * This writes out an <classchanged> node with the real class * name as the name attribute. * * @param internalName the internal name of the class that has changed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startClassChanged(String internalName) throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info about a removed field. * This just writes out the field info, it will be inside a start/end * removed section. * * @param info Info about the field that's been removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldRemoved(FieldInfo info) throws DiffException { try { writeFieldInfo(info); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info about a removed method. * This just writes out the method info, it will be inside a start/end * removed section. * * @param info Info about the method that's been removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodRemoved(MethodInfo info) throws DiffException { try { writeMethodInfo(info); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info about an added field. * This just writes out the field info, it will be inside a start/end * added section. * * @param info Info about the added field. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldAdded(FieldInfo info) throws DiffException { try { writeFieldInfo(info); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info about a added method. * This just writes out the method info, it will be inside a start/end * added section. * * @param info Info about the added method. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodAdded(MethodInfo info) throws DiffException { try { writeMethodInfo(info); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info aboout a changed class. * This writes out a <classchange> node, followed by a * <from> node, with the old information about the class * followed by a <to> node with the new information about the * class. * * @param oldInfo Info about the old class. * @param newInfo Info about the new class. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classChanged(ClassInfo oldInfo, ClassInfo newInfo) throws DiffException { try { out.write(""); writeClassInfo(oldInfo); out.write(""); writeClassInfo(newInfo); out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info aboout a changed field. * This writes out a <fieldchange> node, followed by a * <from> node, with the old information about the field * followed by a <to> node with the new information about the * field. * * @param oldInfo Info about the old field. * @param newInfo Info about the new field. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldChanged(FieldInfo oldInfo, FieldInfo newInfo) throws DiffException { try { out.write(""); writeFieldInfo(oldInfo); out.write(""); writeFieldInfo(newInfo); out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out info aboout a changed method. * This writes out a <methodchange> node, followed by a * <from> node, with the old information about the method * followed by a <to> node with the new information about the * method. * * @param oldInfo Info about the old method. * @param newInfo Info about the new method. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodChanged(MethodInfo oldInfo, MethodInfo newInfo) throws DiffException { try { out.write(""); writeMethodInfo(oldInfo); out.write(""); writeMethodInfo(newInfo); out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the changed section for an individual class. * This closes the <classchanged> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endClassChanged() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the changed section. * This closes the <changed> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endChanged() throws DiffException { try { out.write(""); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * End the diff. * This closes the <diff> node. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endDiff() throws DiffException { try { out.write(""); out.newLine(); out.close(); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Write out information about a class. * This writes out a <class> node, which contains information about * what interfaces are implemented each in a <implements> node. * * @param info Info about the class to write out. * @throws IOException when there is an underlying IOException. */ protected void writeClassInfo(ClassInfo info) throws IOException { out.write(""); } String[] interfaces = info.getInterfaces(); for (int i = 0; i < interfaces.length; i++) { out.write(""); } out.write(""); } /** * Write out information about a method. * This writes out a <method> node which contains information about * the arguments, the return type, and the exceptions thrown by the * method. * * @param info Info about the method. * @throws IOException when there is an underlying IOException. */ protected void writeMethodInfo(MethodInfo info) throws IOException { out.write(""); if (info.getDesc() != null) { addMethodNodes(info.getDesc()); } String[] exceptions = info.getExceptions(); if (exceptions != null) { for (int i = 0; i < exceptions.length; i++) { out.write(""); } } out.write(""); } /** * Write out information about a field. * This writes out a <field> node with attributes describing the * field. * * @param info Info about the field. * @throws IOException when there is an underlying IOException. */ protected void writeFieldInfo(FieldInfo info) throws IOException { out.write(""); if (info.getDesc() != null) { addTypeNode(info.getDesc()); } out.write(""); } /** * Add attributes describing some access flags. * This adds the attributes to the attr field. * * @param info Info describing the access flags. * @throws IOException when there is an underlying IOException. */ protected void addAccessFlags(AbstractInfo info) throws IOException { out.write(" access=\""); // Doesn't need escaping. out.write(info.getAccessType()); out.write("\""); if (info.isAbstract()) out.write(" abstract=\"yes\""); if (info.isAnnotation()) out.write(" annotation=\"yes\""); if (info.isBridge()) out.write(" bridge=\"yes\""); if (info.isDeprecated()) out.write(" deprecated=\"yes\""); if (info.isEnum()) out.write(" enum=\"yes\""); if (info.isFinal()) out.write(" final=\"yes\""); if (info.isInterface()) out.write(" interface=\"yes\""); if (info.isNative()) out.write(" native=\"yes\""); if (info.isStatic()) out.write(" static=\"yes\""); if (info.isStrict()) out.write(" strict=\"yes\""); if (info.isSuper()) out.write(" super=\"yes\""); if (info.isSynchronized()) out.write(" synchronized=\"yes\""); if (info.isSynthetic()) out.write(" synthetic=\"yes\""); if (info.isTransient()) out.write(" transient=\"yes\""); if (info.isVarargs()) out.write(" varargs=\"yes\""); if (info.isVolatile()) out.write(" volatile=\"yes\""); } /** * Add the method nodes for the method descriptor. * This writes out an <arguments> node containing the * argument types for the method, followed by a <return> node * containing the return type. * * @param desc The descriptor for the method to write out. * @throws IOException when there is an underlying IOException. */ protected void addMethodNodes(String desc) throws IOException { Type[] args = Type.getArgumentTypes(desc); Type ret = Type.getReturnType(desc); out.write(""); for (int i = 0; i < args.length; i++) addTypeNode(args[i]); out.write(""); out.write(""); addTypeNode(ret); out.write(""); } /** * Add a type node for the specified descriptor. * * @param desc A type descriptor. * @throws IOException when there is an underlying IOException. */ protected void addTypeNode(String desc) throws IOException { addTypeNode(Type.getType(desc)); } /** * Add a type node for the specified type. * This writes out a <type> node with attributes describing * the type. * * @param type The type to describe. * @throws IOException when there is an underlying IOException. */ protected void addTypeNode(Type type) throws IOException { out.write(""); break; case Type.BYTE: out.write(" primitive=\"yes\" name=\"byte\"/>"); break; case Type.CHAR: out.write(" primitive=\"yes\" name=\"char\"/>"); break; case Type.DOUBLE: out.write(" primitive=\"yes\" name=\"double\"/>"); break; case Type.FLOAT: out.write(" primitive=\"yes\" name=\"float\"/>"); break; case Type.INT: out.write(" primitive=\"yes\" name=\"int\"/>"); break; case Type.LONG: out.write(" primitive=\"yes\" name=\"long\"/>"); break; case Type.OBJECT: out.write(" name=\""); out.write(xmlEscape(type.getInternalName())); out.write("\"/>"); break; case Type.SHORT: out.write(" primitive=\"yes\" name=\"short\"/>"); break; case Type.VOID: out.write(" primitive=\"yes\" name=\"void\"/>"); break; } } /** * Escape some text into a format suitable for output as xml. * * @param str the text to format * @return the formatted text */ private final String xmlEscape(final String str) { StringBuffer ret = new StringBuffer(str.length()); for(int i=0;i': ret.append(">"); break; default: ret.append(ch); } } return ret.toString(); } } jardiff-0.2/src/java/org/osjava/jardiff/ClassInfo.java100644 0 0 11570 10376451445 20057 0ustar 0 0 /* * org.osjava.jardiff.ClassInfo * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import java.util.Map; /** * Information about a class file. * * @author Antony Riley */ public final class ClassInfo extends AbstractInfo { /** * The classfile version number. */ private int version; /** * The class signature. */ private String signature; /** * The internal classname of the superclass. */ private String supername; /** * An array of names of internal classnames of interfaces implmented * by the class. */ private String[] interfaces; /** * A map of method signature to MethodInfo, for the methods provided * by this class. */ private Map methodMap; /** * A map of field signature to FieldInfo, for the fields provided by * this class. */ private Map fieldMap; /** * Create a new classinfo. * * @param version the class file version number. * @param access the access flags for the class. * @param name the internal name of the class. * @param signature the signature of the class. * @param interfaces an array of internal names of interfaces implemented * by the class. * @param methodMap a map of methods provided by this class. * @param fieldMap a map of fields provided by this class. */ public ClassInfo(int version, int access, String name, String signature, String supername, String[] interfaces, Map methodMap, Map fieldMap) { super(access, name); this.version = version; this.signature = signature; this.supername = supername; this.interfaces = interfaces; this.methodMap = methodMap; this.fieldMap = fieldMap; } /** * Get the class file version. * * @return The class file version as specified in the java language spec. */ public final int getVersion() { return version; } /** * Get the class signature. * * @return the class signature */ public final String getSignature() { return signature; } /** * Get the internal name of the superclass. * * @return the internal name of the superclass */ public final String getSupername() { return supername; } /** * Get the internal names of the interfaces implemented by this class * * @return an array of internal names of classes implemented by the class. */ public final String[] getInterfaces() { return interfaces; } /** * Get the map of method signatures to methods. * * @return a map with method signatures as keys, and MethodInfos as values. */ public final Map getMethodMap() { return methodMap; } /** * Get the map of field signatures to fields. * * @return a map with field signatures as keys, and FieldInfos as values. */ public final Map getFieldMap() { return fieldMap; } } jardiff-0.2/src/java/org/osjava/jardiff/DiffException.java100644 0 0 4435 10376451445 20707 0ustar 0 0 /* * org.osjava.jardiff.DiffException * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * A wrapper exception classes for various exceptions that can happen * whilst performing a diff. * * @author Antony Riley */ public class DiffException extends Exception { /** * Create a new DiffException wrapping another exception. * * @param toWrap the wrapped exception */ public DiffException(Exception toWrap) { super((Throwable) toWrap); } } jardiff-0.2/src/java/org/osjava/jardiff/AbstractInfo.java100644 0 0 21572 10376451445 20560 0ustar 0 0 /* * org.osjava.jardiff.AbstractInfo * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import org.objectweb.asm.Opcodes; /** * An abstract class representing information about a class, method or field. * * @author Antony Riley */ public abstract class AbstractInfo { /** * The string used to represent a class, method or field with public * access. */ public final String ACCESS_PUBLIC = "public"; /** * The string used to represent a class, method or field with protected * access. */ public final String ACCESS_PROTECTED = "protected"; /** * The string used to represent a class, method or field with package * private access. * Package private access is the default access level used by java when * you do not specify one of public, protected or private. */ public final String ACCESS_PACKAGE = "package"; /** * The string used to represent a class, method or field with private * access. */ public final String ACCESS_PRIVATE = "private"; /** * The access flags for this class, method or field. */ private final int access; /** * The internal name of this class, method or field. */ private final String name; /** * Construct a new AbstractInfo with the specified access and name. * * @param access The access flags for this class, method or field. * @param name The internal name of this class, method or field. */ public AbstractInfo(int access, String name) { this.access = access; this.name = name; } /** * Get the access flags for this class, method or field. * * @return the access flags. */ public final int getAccess() { return access; } /** * Get the internal name of this class, method or field. * * @return the name */ public final String getName() { return name; } /** * Test if this class, method or field is public. * * @return true if it is public. */ public final boolean isPublic() { return (access & Opcodes.ACC_PUBLIC) != 0; } /** * Test if this class, method or field is protected. * * @return true if it is protected. */ public final boolean isProtected() { return (access & Opcodes.ACC_PROTECTED) != 0; } /** * Test if this class, method or field is package private. * * @return true if it is package private. */ public final boolean isPackagePrivate() { return (access & (Opcodes.ACC_PUBLIC | Opcodes.ACC_PROTECTED | Opcodes.ACC_PRIVATE)) == 0; } /** * Test if this class, method or field is private. * * @return true if it is private. */ public final boolean isPrivate() { return (access & Opcodes.ACC_PRIVATE) != 0; } /** * Test if this class, method or field is abstract. * * @return true if it is abstract. */ public final boolean isAbstract() { return (access & Opcodes.ACC_ABSTRACT) != 0; } /** * Test if this class, method or field is annotation * * @return true if it is annotation. */ public final boolean isAnnotation() { return (access & Opcodes.ACC_ANNOTATION) != 0; } /** * Test if this class, method or field is a bridge * * @return true if it is a bridge. */ public final boolean isBridge() { return (access & Opcodes.ACC_BRIDGE) != 0; } /** * Test if this class, method or field is deprecated. * * @return true if it is deprecated. */ public final boolean isDeprecated() { return (access & Opcodes.ACC_DEPRECATED) != 0; } /** * Test if this class, method or field is an enum. * * @return true if it is an enum. */ public final boolean isEnum() { return (access & Opcodes.ACC_ENUM) != 0; } /** * Test if this class, method or field is final. * * @return true if it is final. */ public final boolean isFinal() { return (access & Opcodes.ACC_FINAL) != 0; } /** * Test if this class, method or field is an interface. * * @return true if it is an interface. */ public final boolean isInterface() { return (access & Opcodes.ACC_INTERFACE) != 0; } /** * Test if this class, method or field is native. * * @return true if it is native. */ public final boolean isNative() { return (access & Opcodes.ACC_NATIVE) != 0; } /** * Test if this class, method or field is static. * * @return true if it is static. */ public final boolean isStatic() { return (access & Opcodes.ACC_STATIC) != 0; } /** * Test if this class, method or field is string. * * @return true if it is strict. */ public final boolean isStrict() { return (access & Opcodes.ACC_STRICT) != 0; } /** * Test if this class, method or field is super. * * @return true if it is super. */ public final boolean isSuper() { return (access & Opcodes.ACC_SUPER) != 0; } /** * Test if this class, method or field is synchronized. * * @return true if it is synchronized */ public final boolean isSynchronized() { return (access & Opcodes.ACC_SYNCHRONIZED) != 0; } /** * Test if this class, method or field is synthetic. * * @return true if it is synchronized. */ public final boolean isSynthetic() { return (access & Opcodes.ACC_SYNTHETIC) != 0; } /** * Test if this class or field is transient. * If this flag is set on a method it means something different. * * @return true if it is transient. */ public final boolean isTransient() { return !(this instanceof MethodInfo) && ((access & Opcodes.ACC_TRANSIENT) != 0); } /** * Test if this method is varargs. * If this flag is set on a class or field it means something different. * Well, it probably shouldn't be set on a class as it would make * no sense, it only really makes sense on fields and methods. * * @return true if it is vargargs. */ public final boolean isVarargs() { return (this instanceof MethodInfo) && ((access & Opcodes.ACC_VARARGS) != 0); } /** * Test if this class, method or field is volatile. * * @return true if it is volatile. */ public final boolean isVolatile() { return (access & Opcodes.ACC_VOLATILE) != 0; } /** * Retrivie the access level for this class, method or field. * * @return the access level */ public final String getAccessType() { if (isPublic()) return ACCESS_PUBLIC; if (isProtected()) return ACCESS_PROTECTED; if (isPrivate()) return ACCESS_PRIVATE; return ACCESS_PACKAGE; } } jardiff-0.2/src/java/org/osjava/jardiff/Tools.java100644 0 0 6024 10376451445 17254 0ustar 0 0 /* * org.osjava.jardiff.Tools * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * A set of Tools which do not belong anywhere else in the API at this time. * This is nasty, but for now, useful. * * @author Antony Riley */ public final class Tools { /** * Private constructor so this class can't be instantiated. */ private Tools() { /* empty */ } /** * Get the java class name given an internal class name. * This method currently replaces all instances of $ and / with . this * may not be according to the java language spec, and will almost * certainly fail for some inner classes. * * @param internalName The internal name of the class. * @return The java class name. */ public static final String getClassName(String internalName) { StringBuffer ret = new StringBuffer(internalName.length()); for (int i = 0; i < internalName.length(); i++) { char ch = internalName.charAt(i); switch (ch) { case '$': case '/': ret.append('.'); break; default: ret.append(ch); } } return ret.toString(); } } jardiff-0.2/src/java/org/osjava/jardiff/JarDiff.java100644 0 0 43251 10376451445 17504 0ustar 0 0 /* * org.osjava.jardiff.JarDiff * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.net.URLClassLoader; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.TreeMap; import java.util.jar.JarEntry; import java.util.jar.JarFile; /* import javax.xml.transform.ErrorListener; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; */ import org.objectweb.asm.ClassReader; /** * A class to perform a diff between two jar files. * * @author Antony Riley */ public class JarDiff { /** * A map containing information about classes which are dependencies. * Keys are internal class names. * Values are instances of ClassInfo. */ protected Map depClassInfo = new HashMap(); /** * A map containing information about classes in the old jar file. * Keys are internal class names. * Values are instances of ClassInfo. */ protected Map oldClassInfo = new TreeMap(); /** * A map containing information about classes in the new jar file. * Keys are internal class names. * Values are instances of ClassInfo. */ protected Map newClassInfo = new TreeMap(); /** * An array of dependencies which are jar files, or urls. */ private URL[] deps; /** * A class loader used for loading dependency classes. */ private URLClassLoader depLoader; /** * The name of the old version. */ private String oldVersion; /** * The name of the new version. */ private String newVersion; /** * Class info visitor, used to load information about classes. */ private ClassInfoVisitor infoVisitor = new ClassInfoVisitor(); /** * Create a new JarDiff object. */ public JarDiff() { } /** * Set the name of the old version. * * @param oldVersion the name */ public void setOldVersion(String oldVersion) { this.oldVersion = oldVersion; } /** * Get the name of the old version. * * @return the name */ public String getOldVersion() { return oldVersion; } /** * Set the name of the new version. * * @param newVersion */ public void setNewVersion(String newVersion) { this.newVersion = newVersion; } /** * Get the name of the new version. * * @return the name */ public String getNewVersion() { return newVersion; } /** * Set the dependencies. * * @param deps an array of urls pointing to jar files or directories * containing classes which are required dependencies. */ public void setDependencies(URL[] deps) { this.deps = deps; } /** * Get the dependencies. * * @return the dependencies as an array of URLs */ public URL[] getDependencies() { return deps; } /** * Load classinfo given a ClassReader. * * @param reader the ClassReader * @return the ClassInfo */ private synchronized ClassInfo loadClassInfo(ClassReader reader) throws IOException { infoVisitor.reset(); reader.accept(infoVisitor, false); return infoVisitor.getClassInfo(); } /** * Load all the classes from the specified URL and store information * about them in the specified map. * This currently only works for jar files, not directories * which contain classes in subdirectories or in the current directory. * * @param infoMap the map to store the ClassInfo in. * @throws DiffException if there is an exception reading info about a * class. */ private void loadClasses(Map infoMap, URL path) throws DiffException { try { File jarFile = null; if(!"file".equals(path.getProtocol()) || path.getHost() != null) { // If it's not a local file, store it as a temporary jar file. // java.util.jar.JarFile requires a local file handle. jarFile = File.createTempFile("jardiff","jar"); // Mark it to be deleted on exit. jarFile.deleteOnExit(); InputStream in = path.openStream(); OutputStream out = new FileOutputStream(jarFile); byte[] buffer = new byte[4096]; int i; while( (i = in.read(buffer,0,buffer.length)) != -1) { out.write(buffer, 0, i); } in.close(); out.close(); } else { // Else it's a local file, nothing special to do. jarFile = new File(path.getPath()); } loadClasses(infoMap, jarFile); } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Load all the classes from the specified URL and store information * about them in the specified map. * This currently only works for jar files, not directories * which contain classes in subdirectories or in the current directory. * * @param infoMap the map to store the ClassInfo in. * @param file the jarfile to load classes from. * @throws IOException if there is an IOException reading info about a * class. */ private void loadClasses(Map infoMap, File file) throws DiffException { try { JarFile jar = new JarFile(file); Enumeration e = jar.entries(); while (e.hasMoreElements()) { JarEntry entry = (JarEntry) e.nextElement(); String name = entry.getName(); if (!entry.isDirectory() && name.endsWith(".class")) { ClassReader reader = new ClassReader(jar.getInputStream(entry)); ClassInfo ci = loadClassInfo(reader); infoMap.put(ci.getName(), ci); } } } catch (IOException ioe) { throw new DiffException(ioe); } } /** * Load old classes from the specified URL. * * @param loc The location of a jar file to load classes from. * @throws DiffException if there is an IOException. */ public void loadOldClasses(URL loc) throws DiffException { loadClasses(oldClassInfo, loc); } /** * Load new classes from the specified URL. * * @param loc The location of a jar file to load classes from. * @throws DiffException if there is an IOException. */ public void loadNewClasses(URL loc) throws DiffException { loadClasses(newClassInfo, loc); } /** * Load old classes from the specified File. * * @param file The location of a jar file to load classes from. * @throws DiffException if there is an IOException */ public void loadOldClasses(File file) throws DiffException { loadClasses(oldClassInfo, file); } /** * Load new classes from the specified File. * * @param file The location of a jar file to load classes from. * @throws DiffExeption if there is an IOException */ public void loadNewClasses(File file) throws DiffException { loadClasses(newClassInfo, file); } /** * Perform a diff sending the output to the specified handler, using * the specified criteria to select diffs. * * @param handler The handler to receive and handle differences. * @param criteria The criteria we use to select differences. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void diff(DiffHandler handler, DiffCriteria criteria) throws DiffException { // TODO: Build the name from the MANIFEST rather than the filename handler.startDiff(oldVersion, newVersion); Iterator i; handler.startOldContents(); i = oldClassInfo.entrySet().iterator(); while(i.hasNext()) { Map.Entry entry = (Map.Entry) i.next(); ClassInfo ci = (ClassInfo) entry.getValue(); if(criteria.validClass(ci)) { handler.contains(ci); } } handler.endOldContents(); handler.startNewContents(); i = newClassInfo.entrySet().iterator(); while(i.hasNext()) { Map.Entry entry = (Map.Entry) i.next(); ClassInfo ci = (ClassInfo) entry.getValue(); if(criteria.validClass(ci)) { handler.contains(ci); } } handler.endNewContents(); java.util.Set onlyOld = new TreeSet(oldClassInfo.keySet()); java.util.Set onlyNew = new TreeSet(newClassInfo.keySet()); java.util.Set both = new TreeSet(oldClassInfo.keySet()); onlyOld.removeAll(newClassInfo.keySet()); onlyNew.removeAll(oldClassInfo.keySet()); both.retainAll(newClassInfo.keySet()); handler.startRemoved(); i = onlyOld.iterator(); while (i.hasNext()) { String s = (String) i.next(); ClassInfo ci = (ClassInfo) oldClassInfo.get(s); if (criteria.validClass(ci)) handler.classRemoved(ci); } handler.endRemoved(); handler.startAdded(); i = onlyNew.iterator(); while (i.hasNext()) { String s = (String) i.next(); ClassInfo ci = (ClassInfo) newClassInfo.get(s); if (criteria.validClass(ci)) handler.classAdded(ci); } handler.endAdded(); java.util.Set removedMethods = new TreeSet(); java.util.Set removedFields = new TreeSet(); java.util.Set addedMethods = new TreeSet(); java.util.Set addedFields = new TreeSet(); java.util.Set changedMethods = new TreeSet(); java.util.Set changedFields = new TreeSet(); handler.startChanged(); i = both.iterator(); while (i.hasNext()) { String s = (String) i.next(); ClassInfo oci = (ClassInfo) oldClassInfo.get(s); ClassInfo nci = (ClassInfo) newClassInfo.get(s); if (criteria.validClass(oci) || criteria.validClass(nci)) { Map oldMethods = oci.getMethodMap(); Map oldFields = oci.getFieldMap(); Map newMethods = nci.getMethodMap(); Map newFields = nci.getFieldMap(); Iterator j = oldMethods.entrySet().iterator(); while (j.hasNext()) { Map.Entry entry = (Map.Entry) j.next(); if (criteria.validMethod((MethodInfo) entry.getValue())) removedMethods.add(entry.getKey()); } j = oldFields.entrySet().iterator(); while (j.hasNext()) { Map.Entry entry = (Map.Entry) j.next(); if (criteria.validField((FieldInfo) entry.getValue())) removedFields.add(entry.getKey()); } j = newMethods.entrySet().iterator(); while (j.hasNext()) { Map.Entry entry = (Map.Entry) j.next(); if (criteria.validMethod((MethodInfo) entry.getValue())) addedMethods.add(entry.getKey()); } j = newFields.entrySet().iterator(); while (j.hasNext()) { Map.Entry entry = (Map.Entry) j.next(); if (criteria.validField((FieldInfo) entry.getValue())) addedFields.add(entry.getKey()); } changedMethods.addAll(removedMethods); changedMethods.retainAll(addedMethods); removedMethods.removeAll(changedMethods); addedMethods.removeAll(changedMethods); changedFields.addAll(removedFields); changedFields.retainAll(addedFields); removedFields.removeAll(changedFields); addedFields.removeAll(changedFields); j = changedMethods.iterator(); while (j.hasNext()) { String desc = (String) j.next(); MethodInfo oldInfo = (MethodInfo) oldMethods.get(desc); MethodInfo newInfo = (MethodInfo) newMethods.get(desc); if (!criteria.differs(oldInfo, newInfo)) j.remove(); } j = changedFields.iterator(); while (j.hasNext()) { String desc = (String) j.next(); FieldInfo oldInfo = (FieldInfo) oldFields.get(desc); FieldInfo newInfo = (FieldInfo) newFields.get(desc); if (!criteria.differs(oldInfo, newInfo)) j.remove(); } boolean classchanged = criteria.differs(oci, nci); if (classchanged || !removedMethods.isEmpty() || !removedFields.isEmpty() || !addedMethods.isEmpty() || !addedFields.isEmpty() || !changedMethods.isEmpty() || !changedFields.isEmpty()) { handler.startClassChanged(s); handler.startRemoved(); j = removedFields.iterator(); while (j.hasNext()) handler .fieldRemoved((FieldInfo) oldFields.get(j.next())); j = removedMethods.iterator(); while (j.hasNext()) handler.methodRemoved((MethodInfo) oldMethods.get(j.next())); handler.endRemoved(); handler.startAdded(); j = addedFields.iterator(); while (j.hasNext()) handler .fieldAdded((FieldInfo) newFields.get(j.next())); j = addedMethods.iterator(); while (j.hasNext()) handler.methodAdded((MethodInfo) newMethods.get(j.next())); handler.endAdded(); handler.startChanged(); if (classchanged) handler.classChanged(oci, nci); j = changedFields.iterator(); while (j.hasNext()) { Object tmp = j.next(); handler.fieldChanged((FieldInfo) oldFields.get(tmp), (FieldInfo) newFields.get(tmp)); } j = changedMethods.iterator(); while (j.hasNext()) { Object tmp = j.next(); handler.methodChanged((MethodInfo) oldMethods.get(tmp), ((MethodInfo) newMethods.get(tmp))); } handler.endChanged(); handler.endClassChanged(); removedMethods.clear(); removedFields.clear(); addedMethods.clear(); addedFields.clear(); changedMethods.clear(); changedFields.clear(); } } } handler.endChanged(); handler.endDiff(); } } jardiff-0.2/src/java/org/osjava/jardiff/Main.java100644 0 0 23403 10376451445 17060 0ustar 0 0 /* * org.osjava.jardiff.Main * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.util.HashSet; import java.util.Set; import javax.xml.transform.ErrorListener; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.Parser; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.Options; /** * A static entry point for use from the command line. */ public class Main { /** * Private constructor to prevent this class being instantiated. */ private Main() { } /** * Define set of valid formats. * This is here to make maintenance more easy. */ private final static Set FORMATS = new HashSet(); /** * Can you javadoc static code, I think not, but lets try anyway. */ static { FORMATS.add("html"); FORMATS.add("xhtml"); FORMATS.add("text"); } /** * Utility function for showing help using commons-cli. * @param options Command line options. * @param msg Optional message to show. */ private static void showHelp(Options options, String msg) { if(msg != null) { System.out.println(msg); } HelpFormatter hf = new HelpFormatter(); hf.printHelp("JarDiff -f -t [-F ] [-T ] [[-o ]|[-x ]] [-O ] [-s ] [-fa ] [-ta ]", options); } /** * Main method to allow this to be run from the command line. * This needs work, currently only takes two arguments, which are * the old jar file and the new jar file. * * @param args A string array of length two containing the filenames of * two jar files, the first of which being the older of the * two. * @throws Exception when there is an underlying exception, e.g. * writing to a file caused an IOException */ public static void main(String[] args) throws Exception { try { Options options = new Options(); Option tmp; tmp = new Option("f","from",true,"from jar file"); options.addOption(tmp); tmp = new Option("t","to",true,"to jar file"); options.addOption(tmp); tmp = new Option("F","from-name",true,"from name"); options.addOption(tmp); tmp = new Option("T","to-name",true,"to name"); options.addOption(tmp); //tmp = new Option("d","dep",true,"dependency path"); //options.addOption(tmp); tmp = new Option("o","output-format",true,"output format, xml or html"); options.addOption(tmp); tmp = new Option("O","out",true,"output file"); options.addOption(tmp); tmp = new Option("h","help",false,"print help on command line arguments"); options.addOption(tmp); tmp = new Option("x","xsl",true,"custom xsl sheet to format output with"); options.addOption(tmp); tmp = new Option("s","stylesheet",true,"stylesheet to link to when generating html"); options.addOption(tmp); tmp = new Option("fa","from-api",true,"relative location of from api"); options.addOption(tmp); tmp = new Option("ta","to-api",true,"relative location of to api"); options.addOption(tmp); Parser parser = new GnuParser(); CommandLine cli = null; try { cli = parser.parse(options, args); } catch (ParseException pe) { showHelp(options, pe.getMessage()); return; } args = cli.getArgs(); if(cli.hasOption('h')) { showHelp(options, null); return; } if(args.length > 0) { showHelp(options, "Additional arguments specified"); return; } if(!cli.hasOption('f')) { showHelp(options, "Missing required argument: -f"); return; } if(!cli.hasOption('t')) { showHelp(options, "Missing required argument: -t"); return; } TransformerFactory tf = TransformerFactory.newInstance(); tf.setErrorListener( new ErrorListener() { public void warning(TransformerException te) { System.err.println("xslt warning: "+te.getMessageAndLocation()); } public void error(TransformerException te) { System.err.println("xslt error: "+te.getMessageAndLocation()); } public void fatalError(TransformerException te) { System.err.println("xslt fatal error: "+te.getMessageAndLocation()); } }); Transformer ot; if(cli.hasOption('o')) { if(cli.hasOption('x')) { showHelp(options, "Cannot use both -x and -o"); return; } String val = cli.getOptionValue('o'); if("xml".equals(val)) { ot = tf.newTransformer(); } else if(FORMATS.contains(val)) { URL url = JarDiff.class.getClassLoader() .getResource("style/jardiff-"+val+".xsl"); ot = tf.newTransformer( new StreamSource( url.toString() ) ); } else { showHelp(options, "Invalid output format: "+val); return; } } else if(cli.hasOption('x')) { File xsl = new File(cli.getOptionValue('x')); ot = tf.newTransformer(new StreamSource(xsl)); } else { ot = tf.newTransformer(); } if(cli.hasOption("s")) { ot.setParameter("stylesheet", cli.getOptionValue("s")); } if(cli.hasOption("fa")) { ot.setParameter("from-api", cli.getOptionValue("fa")); } if(cli.hasOption("ta")) { ot.setParameter("to-api", cli.getOptionValue("ta")); } OutputStream out; if(cli.hasOption('O')) { out = new FileOutputStream(cli.getOptionValue('O')); } else { out = System.out; } JarDiff jd = new JarDiff(); File oldFile = new File(cli.getOptionValue('f')); File newFile = new File(cli.getOptionValue('t')); if(cli.hasOption('F')) { jd.setOldVersion(cli.getOptionValue('F')); } else { jd.setOldVersion(oldFile.getName()); } if(cli.hasOption('T')) { jd.setNewVersion(cli.getOptionValue('T')); } else { jd.setNewVersion(newFile.getName()); } jd.loadOldClasses(oldFile); jd.loadNewClasses(newFile); jd.diff( new DOMDiffHandler(ot, new StreamResult(out)), new SimpleDiffCriteria() ); out.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } jardiff-0.2/src/java/org/osjava/jardiff/DiffCriteria.java100644 0 0 7007 10376451445 20511 0ustar 0 0 /* * org.osjava.jardiff.DiffCriteria * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * An interface for choosing which API differences are interesting. * * @author Antony Riley */ public interface DiffCriteria { /** * Check if the class described by classinfo is interesting. * * @return true if classinfo is interesting, false otherwise. */ public boolean validClass(ClassInfo classinfo); /** * Check if the method described by methodinfo is interesting. * * @return true if methodinfo is interesting, false otherwise. */ public boolean validMethod(MethodInfo methodinfo); /** * Check if the method described by fieldinfo is interesting. * * @return true if fieldinfo is interesting, false otherwise. */ public boolean validField(FieldInfo fieldinfo); /** * Check if the differences between the class described by infoA and * the class described by infoB are interesting. * * @return true if the changes are interesting, false otherwise. */ public boolean differs(ClassInfo infoA, ClassInfo infoB); /** * Check if the differences between the method described by infoA and * the method described by infoB are interesting. * * @return true if the changes are interesting, false otherwise. */ public boolean differs(MethodInfo methodinfo, MethodInfo methodinfo_1_); /** * Check if the differences between the field described by infoA and the * field described by infoB are interesting. * * @return true if the changes are interesting, false otherwise. */ public boolean differs(FieldInfo fieldinfo, FieldInfo fieldinfo_2_); } jardiff-0.2/src/java/org/osjava/jardiff/AbstractDiffHandler.java100644 0 0 5265 10376451445 22014 0ustar 0 0 /* * org.osjava.jardiff.AbstractDiffHandler * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * An abstract implementation of DiffHandler which provides utility methods. * * @author Antony Riley */ public abstract class AbstractDiffHandler implements DiffHandler { /** * Get the java classname given the internal class name internalName. * * @return the classname for internalName */ protected final String getClassName(String internalName) { StringBuffer ret = new StringBuffer(internalName.length()); for (int i = 0; i < internalName.length(); i++) { char ch = internalName.charAt(i); switch (ch) { case '$': case '/': ret.append('.'); break; default: ret.append(ch); } } return ret.toString(); } } jardiff-0.2/src/java/org/osjava/jardiff/DiffHandler.java100644 0 0 23360 10376451445 20344 0ustar 0 0 /* * org.osjava.jardiff.DiffHandler * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * An interface for classes which wish to receive information about * differences in class files between two different jar file version to * implement. * * @author Antony Riley */ public interface DiffHandler { /** * Start a diff between two versions, where string a is the old version * and string b is the new version. * * @param a the name of the old version * @param b the name of the new version * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startDiff(String a, String b) throws DiffException; /** * Start the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startOldContents() throws DiffException; /** * Start the list of new contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startNewContents() throws DiffException; /** * Add a contained class. * * @param info information about a class * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void contains(ClassInfo info) throws DiffException; /** * End the list of old contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endOldContents() throws DiffException; /** * End the list of new contents. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endNewContents() throws DiffException; /** * Start the list of removed classes. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startRemoved() throws DiffException; /** * Notification that a class was removed. * * @param classinfo information about the class that has been removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classRemoved(ClassInfo classinfo) throws DiffException; /** * End of list of removed classes. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endRemoved() throws DiffException; /** * Start of list of added classes. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startAdded() throws DiffException; /** * Notification that a class was added. * * @param classinfo information about the class that has been removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classAdded(ClassInfo classinfo) throws DiffException; /** * End of list of removed classes. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endAdded() throws DiffException; /** * Start list of changed classes. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startChanged() throws DiffException; /** * Start information about class changes for the classname passed. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void startClassChanged(String string) throws DiffException; /** * The field was removed for the current class that has changed. * * @param fieldinfo Information about the field removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldRemoved(FieldInfo fieldinfo) throws DiffException; /** * The method was removed for the current class that has changed. * * @param methodinfo Information about the method removed. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodRemoved(MethodInfo methodinfo) throws DiffException; /** * The field was added for the current class that has changed. * * @param fieldinfo Information about the field added. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldAdded(FieldInfo fieldinfo) throws DiffException; /** * The method was added for the current class that has changed. * * @param methodinfo Information about the method added. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodAdded(MethodInfo methodinfo) throws DiffException; /** * The current class has changed. * This is called when a class's interfaces or superclass or access * flags have changed. * * @param oldClassinfo Information about the old class. * @param newClassinfo Information about the new class. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void classChanged(ClassInfo oldClassinfo, ClassInfo newClassinfo) throws DiffException; /** * A field on the current class has changed. * * @param oldFieldinfo Information about the old field. * @param newFieldinfo Information about the new field. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void fieldChanged(FieldInfo oldFieldinfo, FieldInfo newFieldinfo) throws DiffException; /** * A method on the current class has changed. * * @param oldMethodInfo Information about the old method. * @param newMethodInfo Information about the new method. * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void methodChanged (MethodInfo oldMethodInfo, MethodInfo newMethodInfo) throws DiffException; /** * End of changes for the current class. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endClassChanged() throws DiffException; /** * End of class changes. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endChanged() throws DiffException; /** * End of the diff. * * @throws DiffException when there is an underlying exception, e.g. * writing to a file caused an IOException */ public void endDiff() throws DiffException; } jardiff-0.2/src/java/org/osjava/jardiff/FieldInfo.java100644 0 0 6453 10376451445 20021 0ustar 0 0 /* * org.osjava.jardiff.FieldInfo * * $Id: IOThread.java 1952 2005-08-28 18:03:41Z cybertiger $ * $URL: https://svn.osjava.org/svn/osjava/trunk/osjava-nio/src/java/org/osjava/nio/IOThread.java $ * $Rev: 1952 $ * $Date: 2005-08-28 18:03:41 +0000 (Sun, 28 Aug 2005) $ * $Author: cybertiger $ * * Copyright (c) 2005, Antony Riley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * + Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * + Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * + Neither the name JarDiff nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.osjava.jardiff; /** * Information about a field of a class. * * @author Antony Riley */ public final class FieldInfo extends AbstractInfo { /** * The field descriptor for this field. */ private String desc; /** * The signature for this field. */ private String signature; /** * The initial value of this field. */ private Object value; /** * Create a new FieldInfo * * @param access The access flags. * @param name The name of the field. * @param desc The field discriptor. * @param signature The signature of this field. * @param value The initial value of the field. */ public FieldInfo(int access, String name, String desc, String signature, Object value) { super(access, name); this.desc = desc; this.signature = signature; this.value = value; } /** * Get the descriptor for this FieldInfo. * * @return The field descriptor. */ public final String getDesc() { return desc; } /** * Get the signature for this fieldinfo. * * @return The signature. */ public final String getSignature() { return signature; } /** * Get the initial value for this fieldinfo * * @return The initial value. */ public final Object getValue() { return value; } } jardiff-0.2/src/xsl/jardiff-html.xsl100644 0 0 576 10376451445 14604 0ustar 0 0 jardiff-0.2/src/xsl/jardiff-xhtml.xsl100644 0 0 575 10376451445 14773 0ustar 0 0 jardiff-0.2/src/xsl/jardiff-text.xsl100644 0 0 20315 10376451445 14655 0ustar 0 0 Comparing to API diff generated by JarDiff http://www.osjava.org/jardiff/ Class removed: Class added: Class changed: Methods removed: Methods added: Fields removed: Fields added: Class descriptor changed: old: new: Method changed: old: new: Field changed: old: new: deprecated: abstract static final extends implements , deprecated: final static synchronized abstract varargs (, ) throws , ; deprecated: final static synchronized abstract transient volatile = ; [] jardiff-0.2/src/xsl/jardiff-html-base.xsl100644 0 0 43162 10376451445 15552 0ustar 0 0 Comparing <xsl:value-of select="@old"/> to <xsl:value-of select="@new"/>

Comparing to

API diff generated by JarDiff

Removed classes

Added classes

Changed classes

  • Removed:
    Added:
    Changed:
    • From:
      To:
    • From:
      To:
    • From:
      To:
(, ) deprecated: final static synchronized abstract (, ) throws , deprecated: final static transient volatile = ; deprecated: abstract static final extends implements , []
jardiff-0.2/src/resources/jardiff.properties100644 0 0 170 10376451445 16422 0ustar 0 0 # Ant properties defining tasks. jdxslt=org.osjava.jardiff.ant.JDXSLTProcess jardiff=org.osjava.jardiff.ant.JarDiffTask (, ) deprecated: final static synchronized abstract (, ) throws , deprecated: final static transient volatile = ; deprecated: abstract static final