Using real example of bytecode patching
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:50:52 +0200
changeset 11617540e9e582
parent 10 5611653dec2f
child 12 711145230748
Using real example of bytecode patching
samples/differentreturntype/build.xml
     1.1 --- a/samples/differentreturntype/build.xml	Sat Jun 14 09:50:51 2008 +0200
     1.2 +++ b/samples/differentreturntype/build.xml	Sat Jun 14 09:50:52 2008 +0200
     1.3 @@ -4,17 +4,13 @@
     1.4          <delete dir="build"/>
     1.5      </target>
     1.6      
     1.7 +    <!-- BEGIN: theory.binary.differentreturntype.ant -->
     1.8      <!-- This is the target that does the whole trick - e,g. it compiles
     1.9          the Java source and then replaces tokens inside of the .class file
    1.10       -->
    1.11      <target name="-build-and-rename">
    1.12          <mkdir dir="build/apimerge/classes"/>
    1.13 -        <javac 
    1.14 -            srcdir="src-apimerge" 
    1.15 -            destdir="build/apimerge/classes" 
    1.16 -            source="1.4" target="1.4"
    1.17 -            classpath="${cp}"
    1.18 -        />
    1.19 +        <javac srcdir="src-apimerge" destdir="build/apimerge/classes" source="1.4" target="1.4" classpath="${cp}"/>
    1.20          
    1.21          <!-- this is the replace. As the replace is done textually,
    1.22              we need to use some reasonable encoding that treats all byte values
    1.23 @@ -27,6 +23,7 @@
    1.24              <replacevalue>getIcon</replacevalue>
    1.25          </replace>
    1.26      </target>
    1.27 +    <!-- END: theory.binary.differentreturntype.ant -->
    1.28      
    1.29      <target name="build" depends="clean">
    1.30          <antcall target="-build-one">