Removing files which were not present in final version and prevent compilation
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 10:29:34 +0200
changeset 258eb43ed265ff1
parent 257 95ff2df63db0
child 259 8822ec3226c8
Removing files which were not present in final version and prevent compilation
samples/build.xml
samples/reexport/src-api1.0/api/StringBuffer.java
samples/reexport/src-api2.0/api/StringBuffer.java
samples/reexport/src-api2.0/api/StringBuilder.java
samples/visitor/abstractclass/src-test/org/apidesign/test/visitor/CountNumbersTest.java
samples/visitor/abstractclass/src-test2.0/org/apidesign/test/visitor/InvalidCountNumbersTest.java
     1.1 --- a/samples/build.xml	Sat Jun 14 10:09:09 2008 +0200
     1.2 +++ b/samples/build.xml	Sat Jun 14 10:29:34 2008 +0200
     1.3 @@ -34,7 +34,7 @@
     1.4          </exec>
     1.5      </target>
     1.6  
     1.7 -    <target name="sources" depends="-version,samples.clean">
     1.8 +    <target name="sources" depends="-version,clean">
     1.9          <fail unless="version"/>
    1.10          
    1.11          <loadfile srcfile="${samples.dir}/../../.hgignore" property="hgignore"/>
     2.1 --- a/samples/reexport/src-api1.0/api/StringBuffer.java	Sat Jun 14 10:09:09 2008 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,20 +0,0 @@
     2.4 -package api;
     2.5 -
     2.6 -public final class StringBuffer {
     2.7 -    private char[] current;
     2.8 -            
     2.9 -    public StringBuffer() {
    2.10 -        current = new char[0];
    2.11 -    }
    2.12 -    
    2.13 -    public synchronized StringBuffer append(String s) {
    2.14 -        char[] arr = new char[current.length + s.chars.length];
    2.15 -        System.arraycopy(current, 0, arr, 0, current.length);
    2.16 -        System.arraycopy(s.chars, 0, arr, current.length, s.chars.length);
    2.17 -        return this;
    2.18 -    }
    2.19 -    
    2.20 -    public synchronized String getString() {
    2.21 -        return new String(current);
    2.22 -    }
    2.23 -}
     3.1 --- a/samples/reexport/src-api2.0/api/StringBuffer.java	Sat Jun 14 10:09:09 2008 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,20 +0,0 @@
     3.4 -package api;
     3.5 -
     3.6 -public final class StringBuffer {
     3.7 -    private char[] current;
     3.8 -            
     3.9 -    public StringBuffer() {
    3.10 -        current = new char[0];
    3.11 -    }
    3.12 -    
    3.13 -    public StringBuffer append(String s) {
    3.14 -        char[] arr = new char[current.length + s.chars.length];
    3.15 -        System.arraycopy(current, 0, arr, 0, current.length);
    3.16 -        System.arraycopy(s.chars, 0, arr, current.length, s.chars.length);
    3.17 -        return this;
    3.18 -    }
    3.19 -    
    3.20 -    public String getString() {
    3.21 -        return new String(current);
    3.22 -    }
    3.23 -}
     4.1 --- a/samples/reexport/src-api2.0/api/StringBuilder.java	Sat Jun 14 10:09:09 2008 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,21 +0,0 @@
     4.4 -package api;
     4.5 -
     4.6 -/** @since 2.0 */
     4.7 -public final class StringBuilder {
     4.8 -    private char[] current;
     4.9 -            
    4.10 -    public StringBuilder() {
    4.11 -        current = new char[0];
    4.12 -    }
    4.13 -    
    4.14 -    public StringBuilder append(String s) {
    4.15 -        char[] arr = new char[current.length + s.chars.length];
    4.16 -        System.arraycopy(current, 0, arr, 0, current.length);
    4.17 -        System.arraycopy(s.chars, 0, arr, current.length, s.chars.length);
    4.18 -        return this;
    4.19 -    }
    4.20 -    
    4.21 -    public String getString() {
    4.22 -        return new String(current);
    4.23 -    }
    4.24 -}
     5.1 --- a/samples/visitor/abstractclass/src-test/org/apidesign/test/visitor/CountNumbersTest.java	Sat Jun 14 10:09:09 2008 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,51 +0,0 @@
     5.4 -package org.apidesign.test.visitor;
     5.5 -
     5.6 -import static junit.framework.Assert.*;
     5.7 -import org.apidesign.visitor.Language.Expression;
     5.8 -import org.apidesign.visitor.Language.Number;
     5.9 -import org.apidesign.visitor.Language.Plus;
    5.10 -import org.apidesign.visitor.Language.Visitor;
    5.11 -import org.junit.Test;
    5.12 -
    5.13 -public class CountNumbersTest {
    5.14 -
    5.15 -    // BEGIN: visitor.count.numbers.visitunknown
    5.16 -    private static class CountNumbers extends Visitor/*version1.0*/ {
    5.17 -        int cnt;
    5.18 -
    5.19 -        @Override
    5.20 -        public void visitUnknown(Expression exp) {
    5.21 -            // not a number
    5.22 -        }
    5.23 -        public void visitPlus(Plus s) {
    5.24 -            s.getFirst().visit(this);
    5.25 -            s.getSecond().visit(this);
    5.26 -        }
    5.27 -        public void visitNumber(Number n) {
    5.28 -            cnt++;
    5.29 -        }
    5.30 -    }
    5.31 -
    5.32 -    public static int countNumbers(Expression expression) {
    5.33 -        CountNumbers counter = new CountNumbers();
    5.34 -        expression.visit(counter);
    5.35 -        return counter.cnt;
    5.36 -    }
    5.37 -    // END: visitor.count.numbers.visitunknown
    5.38 -    
    5.39 -    @Test public void printOnePlusOne() {
    5.40 -        Number one = new Number(1);
    5.41 -        Expression expression = new Plus(one, one);
    5.42 -
    5.43 -        assertEquals("Two 1's", 2, countNumbers(expression));
    5.44 -    }
    5.45 -
    5.46 -    @Test public void printOnePlusTwoPlusThree() {
    5.47 -        Number one = new Number(1);
    5.48 -        Number two = new Number(2);
    5.49 -        Number three = new Number(3);
    5.50 -        Expression plus = new Plus(one, new Plus(two, three));
    5.51 -        
    5.52 -        assertEquals("Three", 3, countNumbers(plus));
    5.53 -    }
    5.54 -}
     6.1 --- a/samples/visitor/abstractclass/src-test2.0/org/apidesign/test/visitor/InvalidCountNumbersTest.java	Sat Jun 14 10:09:09 2008 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,25 +0,0 @@
     6.4 -package org.apidesign.test.visitor;
     6.5 -
     6.6 -import static junit.framework.Assert.*;
     6.7 -import org.apidesign.visitor.Language.Expression;
     6.8 -import org.apidesign.visitor.Language.Minus;
     6.9 -import org.apidesign.visitor.Language.Number;
    6.10 -import org.apidesign.visitor.Language.Plus;
    6.11 -import org.junit.Test;
    6.12 -
    6.13 -public class InvalidCountNumbersTest {
    6.14 -    @Test public void printOneMinusTwo() {
    6.15 -        // BEGIN: visitor.visitunknown.traversal
    6.16 -        Number one = new Number(1);
    6.17 -        Number three = new Number(3);
    6.18 -        Number four = new Number(4);
    6.19 -        Expression minus = new Plus(one, new Minus(three, four));
    6.20 -        
    6.21 -        assertEquals(
    6.22 -            "Should have three numbers, but visitor does not " +
    6.23 -            "know how to go through minus", 
    6.24 -            3, CountNumbersTest.countNumbers(minus)
    6.25 -        );
    6.26 -        // END: visitor.visitunknown.traversal
    6.27 -    }
    6.28 -}