summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authoraclement <aclement>2008-05-14 19:34:45 +0000
committeraclement <aclement>2008-05-14 19:34:45 +0000
commit80600b2b0299a9f90635200706e7313abbca8b9d (patch)
tree5af6648b7f8d4efaf5d44d4c4aa1314e780e4f44 /util
parentc398f4592708d48860e86905a2b980d419043fe1 (diff)
downloadaspectj-80600b2b0299a9f90635200706e7313abbca8b9d.tar.gz
aspectj-80600b2b0299a9f90635200706e7313abbca8b9d.zip
231396: refactoring: removed NonLocalExit and moved StreamPrintWriter into test infrastructure
Diffstat (limited to 'util')
-rw-r--r--util/src/org/aspectj/util/NonLocalExit.java39
-rw-r--r--util/src/org/aspectj/util/StreamPrintWriter.java101
2 files changed, 0 insertions, 140 deletions
diff --git a/util/src/org/aspectj/util/NonLocalExit.java b/util/src/org/aspectj/util/NonLocalExit.java
deleted file mode 100644
index a3ad026b9..000000000
--- a/util/src/org/aspectj/util/NonLocalExit.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/* *******************************************************************
- * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xerox/PARC initial implementation
- * ******************************************************************/
-
-
-package org.aspectj.util;
-
-/**
- * Throw this when a non-local exit is required (suggested for tests only).
- */
-public class NonLocalExit extends RuntimeException {
-
- public static final int SUCCEESS = 0;
- public static final int FAULURE = 1;
-
- private int exitCode;
-
- public NonLocalExit(int exitCode) {
- this();
- this.exitCode = exitCode;
- }
-
- public NonLocalExit() {
- super();
- }
-
- public int getExitCode() {
- return exitCode;
- }
-
-}
diff --git a/util/src/org/aspectj/util/StreamPrintWriter.java b/util/src/org/aspectj/util/StreamPrintWriter.java
deleted file mode 100644
index a8a9b5330..000000000
--- a/util/src/org/aspectj/util/StreamPrintWriter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/* *******************************************************************
- * Copyright (c) 1999-2001 Xerox Corporation,
- * 2002 Palo Alto Research Center, Incorporated (PARC).
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xerox/PARC initial implementation
- * ******************************************************************/
-
-
-package org.aspectj.util;
-
-import java.io.*;
-
-/**
- * Used for writing converting text written to an output stream into
- * a string. Deprecated - use StringWriter:
- * <pre>
- * StringWriter sw = new StringWriter();
- * PrintWriter pw = new PrintWriter(sw, true);
- * ... write to pw
- * String result = sw.getBuffer().toString();
- * </pre>
- * @deprecated use StringWriter to construct PrintWriter
- * @author Mik Kersten
- */
-public class StreamPrintWriter extends PrintWriter {
- private String contents = "";
-
- public StreamPrintWriter(Writer out) {
- super(out);
- }
-
- public String getContents() {
- return contents;
- }
-
- public void flushBuffer() {
- contents = "";
- super.flush();
- }
-
- public void print(char x) {
- contents += x + "\n";
- }
-
- public void print(char[] x) {
- contents += new String( x );
- }
-
- public void print(int x) {
- contents += x;
- }
-
- public void print(String x) {
- contents += x;
- }
-
- public void println(char x) {
- contents += x + "\n";
- }
-
- public void println(char[] x) {
- contents += new String( x ) + "\n";
- }
-
- public void println(int x) {
- contents += x + "\n";
- }
-
- public void println(String x) {
- contents += x + "\n";
- }
-
- public void write( byte[] x ) {
- contents += new String( x );
- }
-
- public void write( byte[] x, int i1, int i2 ) {
- StringWriter writer = new StringWriter();
- String s = new String( x );
- writer.write( s.toCharArray(), i1, i2 );
- contents += writer.getBuffer().toString();
- }
-
- public void write( int c ) {
- contents += c;
- }
-
- public void write( String s ) {
- contents += s;
- }
-
- public void write( String s, int i1, int i2 ) {
- contents += s;
- }
-}