370 lines
9.4 KiB
XML
370 lines
9.4 KiB
XML
<?xml version="1.0" ?>
|
|
|
|
<project
|
|
basedir="."
|
|
default="run"
|
|
name="Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel (chapter: typeinfo)">
|
|
|
|
<description>
|
|
build.xml for the source code for the typeinfo chapter of
|
|
Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel
|
|
Source code available at http://www.MindView.net
|
|
See copyright notice in CopyRight.txt
|
|
|
|
Ant available from: http://ant.apache.org/
|
|
|
|
To see options, type: ant -p
|
|
</description>
|
|
|
|
<condition property="version1.8">
|
|
<equals arg1="1.8" arg2="${ant.java.version}"/>
|
|
</condition>
|
|
|
|
<target name="typeinfo_pets">
|
|
<javac includeantruntime="false"
|
|
classpath="${basedir}/.."
|
|
srcdir="${basedir}/../typeinfo/pets/">
|
|
<compilerarg value="-Xmaxerrs"/>
|
|
<compilerarg value="10"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="net_mindview_util">
|
|
<javac includeantruntime="false"
|
|
classpath="${basedir}/.."
|
|
srcdir="${basedir}/../net/mindview/util/">
|
|
<compilerarg value="-Xmaxerrs"/>
|
|
<compilerarg value="10"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<target
|
|
depends="typeinfo_pets,net_mindview_util"
|
|
description="Build all classes in this directory"
|
|
name="build">
|
|
<fail message="J2SE8 required" unless="version1.8"/>
|
|
<echo message="Building 'typeinfo'"/>
|
|
<javac includeantruntime="false"
|
|
classpath="${basedir}/.."
|
|
debug="true"
|
|
srcdir="${basedir}">
|
|
<compilerarg value="-Xmaxerrs"/>
|
|
<compilerarg value="10"/>
|
|
</javac>
|
|
<echo message="Build 'typeinfo' succeeded"/>
|
|
</target>
|
|
|
|
<target name="AnonymousImplementation">
|
|
<java
|
|
classname="AnonymousImplementation"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="BoundedClassReferences">
|
|
<java
|
|
classname="BoundedClassReferences"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ClassCasts">
|
|
<java
|
|
classname="ClassCasts"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ClassInitialization">
|
|
<java
|
|
classname="ClassInitialization"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="FamilyVsExactType">
|
|
<java
|
|
classname="typeinfo.FamilyVsExactType"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="FilledList">
|
|
<java
|
|
classname="FilledList"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="GenericClassReferences">
|
|
<java
|
|
classname="GenericClassReferences"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="HiddenImplementation">
|
|
<java
|
|
classname="HiddenImplementation"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="InnerImplementation">
|
|
<java
|
|
classname="InnerImplementation"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="InterfaceViolation">
|
|
<java
|
|
classname="InterfaceViolation"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ModifyingPrivateFields">
|
|
<java
|
|
classname="ModifyingPrivateFields"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="NullRobot">
|
|
<java
|
|
classname="NullRobot"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="PetCount">
|
|
<java
|
|
classname="PetCount"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="PetCount2">
|
|
<java
|
|
classname="PetCount2"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="PetCount3">
|
|
<java
|
|
classname="PetCount3"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="PetCount4">
|
|
<java
|
|
classname="PetCount4"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="RegisteredFactories">
|
|
<java
|
|
classname="RegisteredFactories"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="SelectingMethods">
|
|
<java
|
|
classname="SelectingMethods"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Shapes">
|
|
<java
|
|
classname="Shapes"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ShowMethods">
|
|
<java
|
|
classname="ShowMethods"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true">
|
|
<arg line="ShowMethods"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="SimpleDynamicProxy">
|
|
<java
|
|
classname="SimpleDynamicProxy"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="SimpleProxyDemo">
|
|
<java
|
|
classname="SimpleProxyDemo"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="SnowRemovalRobot">
|
|
<java
|
|
classname="SnowRemovalRobot"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="Staff">
|
|
<java
|
|
classname="Staff"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="SweetShop">
|
|
<java
|
|
classname="SweetShop"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="WildcardClassReferences">
|
|
<java
|
|
classname="WildcardClassReferences"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="LiteralPetCreator">
|
|
<java
|
|
classname="typeinfo.pets.LiteralPetCreator"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/pets/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="GenericToyTest">
|
|
<java
|
|
classname="typeinfo.toys.GenericToyTest"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/toys/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target name="ToyTest">
|
|
<java
|
|
classname="typeinfo.toys.ToyTest"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="../typeinfo/toys/"
|
|
failonerror="true"
|
|
fork="true"/>
|
|
</target>
|
|
|
|
<target
|
|
depends="build"
|
|
description="Compile and run"
|
|
name="run">
|
|
<touch file="failures"/>
|
|
<antcall target="AnonymousImplementation"/>
|
|
<antcall target="BoundedClassReferences"/>
|
|
<antcall target="ClassCasts"/>
|
|
<antcall target="ClassInitialization"/>
|
|
<antcall target="FamilyVsExactType"/>
|
|
<antcall target="FilledList"/>
|
|
<antcall target="GenericClassReferences"/>
|
|
<antcall target="HiddenImplementation"/>
|
|
<antcall target="InnerImplementation"/>
|
|
<antcall target="InterfaceViolation"/>
|
|
<antcall target="ModifyingPrivateFields"/>
|
|
<antcall target="NullRobot"/>
|
|
<antcall target="PetCount"/>
|
|
<antcall target="PetCount2"/>
|
|
<antcall target="PetCount3"/>
|
|
<antcall target="PetCount4"/>
|
|
<antcall target="RegisteredFactories"/>
|
|
<antcall target="SelectingMethods"/>
|
|
<antcall target="Shapes"/>
|
|
<antcall target="ShowMethods"/>
|
|
<antcall target="SimpleDynamicProxy"/>
|
|
<antcall target="SimpleProxyDemo"/>
|
|
<antcall target="SnowRemovalRobot"/>
|
|
<antcall target="Staff"/>
|
|
<antcall target="SweetShop"/>
|
|
<antcall target="WildcardClassReferences"/>
|
|
<antcall target="LiteralPetCreator"/>
|
|
<antcall target="GenericToyTest"/>
|
|
<antcall target="ToyTest"/>
|
|
<delete file="failures"/>
|
|
</target>
|
|
|
|
<target description="delete all byproducts" name="clean">
|
|
<delete>
|
|
<fileset dir="${basedir}" includes="**/*.class"/>
|
|
<fileset dir="${basedir}" includes="**/*Output.txt"/>
|
|
<fileset dir="${basedir}" includes="**/log.txt"/>
|
|
<fileset dir="${basedir}" includes="failures"/>
|
|
</delete>
|
|
<echo message="clean successful"/>
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|