SF.net SVN: mx4j: [2253] trunk/mx4j
[email protected] Fri, 24 Nov 2006 05:59:30 -0800
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 2253
http://svn.sourceforge.net/mx4j/?rev=2253&view=rev
Author: simonebordet
Date: 2006-11-24 05:59:30 -0800 (Fri, 24 Nov 2006)
Log Message:
-----------
Moved sources from the Ant structure to the Maven2 structure.
Modified Paths:
--------------
trunk/mx4j/pom.xml
Added Paths:
-----------
trunk/mx4j/tests/
trunk/mx4j/tests/pom.xml
trunk/mx4j/tests/src/
trunk/mx4j/tests/src/main/
trunk/mx4j/tests/src/main/java/
trunk/mx4j/tests/src/main/java/mx4j/
trunk/mx4j/tests/src/main/java/mx4j/MX4JTestCase.java
trunk/mx4j/tests/src/main/java/mx4j/MultiThreadTestRunner.java
trunk/mx4j/tests/src/main/java/mx4j/MutableBoolean.java
trunk/mx4j/tests/src/main/java/mx4j/MutableInteger.java
trunk/mx4j/tests/src/main/java/mx4j/MutableLong.java
trunk/mx4j/tests/src/main/java/mx4j/MutableObject.java
Removed Paths:
-------------
trunk/mx4j/src/test/test/MX4JTestCase.java
trunk/mx4j/src/test/test/MultiThreadTestRunner.java
trunk/mx4j/src/test/test/MutableBoolean.java
trunk/mx4j/src/test/test/MutableInteger.java
trunk/mx4j/src/test/test/MutableLong.java
trunk/mx4j/src/test/test/MutableObject.java
Modified: trunk/mx4j/pom.xml
===================================================================
--- trunk/mx4j/pom.xml 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/pom.xml 2006-11-24 13:59:30 UTC (rev 2253)
@@ -74,6 +74,7 @@
<profiles />
<modules>
+ <module>tests</module>
<module>jsr003</module>
<module>jsr160</module>
<module>tools</module>
Deleted: trunk/mx4j/src/test/test/MX4JTestCase.java
===================================================================
--- trunk/mx4j/src/test/test/MX4JTestCase.java 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/src/test/test/MX4JTestCase.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) The MX4J Contributors.
- * All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 1.0.
- * See the terms of the MX4J License in the documentation provided with this software.
- */
-
-package test;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-
-import junit.framework.TestCase;
-
-/**
- * Base class for MX4J tests
- *
- * @version $Revision$
- */
-public class MX4JTestCase extends TestCase
-{
- public MX4JTestCase(String name)
- {
- super(name);
- }
-
- protected MBeanServer newMBeanServer()
- {
- return MBeanServerFactory.newMBeanServer();
- }
-
- protected ClassLoader createMX4JClassLoader() throws MalformedURLException
- {
- File jmx = new File("dist/test/mx4j-jmx.jar");
- File impl = new File("dist/test/mx4j-impl.jar");
- return new URLClassLoader(new URL[]{jmx.toURL(), impl.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createJMXRIClassLoader() throws MalformedURLException
- {
- File jmxri = new File("dist/test/jmxri.jar");
- if (!jmxri.exists()) fail("JMXRI jar is not available");
- return new URLClassLoader(new URL[]{jmxri.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createJMXRIWithMX4JImplClassLoader() throws MalformedURLException
- {
- File jmxri = new File("dist/test/jmxri.jar");
- if (!jmxri.exists()) fail("JMXRI jar is not available");
- File mx4j = new File("dist/test/mx4j-impl.jar");
- return new URLClassLoader(new URL[]{jmxri.toURL(), mx4j.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createMX4JWithTestsClassLoader() throws MalformedURLException
- {
- File jmx = new File("dist/test/mx4j-jmx.jar");
- File impl = new File("dist/test/mx4j-impl.jar");
- File tests = new File("dist/test/mx4j-tests.jar");
- return new URLClassLoader(new URL[]{jmx.toURL(), impl.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createRemoteMX4JWithTestsClassLoader() throws MalformedURLException
- {
- File jmx = new File("dist/test/mx4j-jmx.jar");
- File impl = new File("dist/test/mx4j-impl.jar");
- File rjmx = new File("dist/test/mx4j-rjmx.jar");
- File rimpl = new File("dist/test/mx4j-rimpl.jar");
- File tests = new File("dist/test/mx4j-tests.jar");
- File jaas = new File("dist/test/jaas.jar");
- return new URLClassLoader(new URL[]{jaas.toURL(), jmx.toURL(), impl.toURL(), rjmx.toURL(), rimpl.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createJMXRIWithTestsClassLoader() throws MalformedURLException
- {
- File jmxri = new File("dist/test/jmxri.jar");
- if (!jmxri.exists()) fail("JMXRI jar is not available");
- File tests = new File("dist/test/mx4j-tests.jar");
- return new URLClassLoader(new URL[]{jmxri.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createRemoteJMXRIWithTestsClassLoader() throws MalformedURLException
- {
- File jmx = new File("dist/test/jmxri.jar");
- if (!jmx.exists()) fail("JMXRI jar is not available");
- File rjmx = new File("dist/test/jmxremote.jar");
- if (!rjmx.exists()) fail("JMX Remote jar is not available");
- File tests = new File("dist/test/mx4j-tests.jar");
- File jaas = new File("dist/test/jaas.jar");
- return new URLClassLoader(new URL[]{jaas.toURL(), jmx.toURL(), rjmx.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected ClassLoader createOptionalRemoteJMXRIWithTestsClassLoader() throws MalformedURLException
- {
- File jmx = new File("dist/test/jmxri.jar");
- if (!jmx.exists()) fail("JMXRI jar is not available");
- File rjmx = new File("dist/test/jmxremote.jar");
- if (!rjmx.exists()) fail("JMX Remote jar is not available");
- File orjmx = new File("dist/test/jmxremote_optional.jar");
- if (!orjmx.exists()) fail("JMX Optional Remote jar is not available");
- File tests = new File("dist/test/mx4j-tests.jar");
- return new URLClassLoader(new URL[]{jmx.toURL(), rjmx.toURL(), orjmx.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
- }
-
- protected void sleep(long time)
- {
- try
- {
- Thread.sleep(time);
- }
- catch (InterruptedException x)
- {
- Thread.currentThread().interrupt();
- }
- }
-}
Deleted: trunk/mx4j/src/test/test/MultiThreadTestRunner.java
===================================================================
--- trunk/mx4j/src/test/test/MultiThreadTestRunner.java 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/src/test/test/MultiThreadTestRunner.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) The MX4J Contributors.
- * All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 1.0.
- * See the terms of the MX4J License in the documentation provided with this software.
- */
-
-package test;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @version $Revision$
- */
-public class MultiThreadTestRunner
-{
- public abstract static class Test
- {
- private List throwables = new ArrayList();
-
- public abstract void test() throws Exception;
-
- private synchronized void addThrowable(Throwable x)
- {
- throwables.add(x);
- }
-
- private synchronized Throwable[] getThrowables()
- {
- return (Throwable[])throwables.toArray(new Throwable[throwables.size()]);
- }
- }
-
- private class MultiThrowable extends Exception
- {
- private final Throwable[] throwables;
-
- public MultiThrowable(Throwable[] throwables)
- {
- this.throwables = throwables;
- }
-
- public void printStackTrace(PrintStream stream)
- {
- synchronized (stream)
- {
- stream.println(this);
- for (int i = 0; i < throwables.length; ++i) throwables[i].printStackTrace(stream);
- }
- }
-
- public void printStackTrace(PrintWriter writer)
- {
- synchronized (writer)
- {
- writer.println(this);
- for (int i = 0; i < throwables.length; ++i) throwables[i].printStackTrace(writer);
- }
- }
- }
-
- private final int threads;
- private final int iterations;
-
- public MultiThreadTestRunner(int threads, int iterations)
- {
- this.threads = threads;
- this.iterations = iterations;
- }
-
- public void run(final Test test) throws Exception
- {
- Thread[] runners = new Thread[threads];
- for (int i = 0; i < threads; ++i)
- {
- runners[i] = new Thread(new Runnable()
- {
- public void run()
- {
- for (int i = 0; i < iterations; ++i)
- {
- try
- {
- test.test();
- }
- catch (Throwable x)
- {
- test.addThrowable(x);
- }
- }
- }
- });
- }
-
- for (int i = 0; i < threads; ++i) runners[i].start();
-
- for (int i = 0; i < threads; ++i) runners[i].join();
-
- Throwable[] failures = test.getThrowables();
- if (failures != null && failures.length > 0) throw new MultiThrowable(failures);
- }
-}
Deleted: trunk/mx4j/src/test/test/MutableBoolean.java
===================================================================
--- trunk/mx4j/src/test/test/MutableBoolean.java 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/src/test/test/MutableBoolean.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) The MX4J Contributors.
- * All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 1.0.
- * See the terms of the MX4J License in the documentation provided with this software.
- */
-
-package test;
-
-/**
- * @version $Revision$
- * @see
- */
-public class MutableBoolean
-{
- private boolean m_value;
-
- public MutableBoolean(boolean value)
- {
- set(value);
- }
-
- public boolean get()
- {
- return m_value;
- }
-
- public void set(boolean value)
- {
- m_value = value;
- }
-}
\ No newline at end of file
Deleted: trunk/mx4j/src/test/test/MutableInteger.java
===================================================================
--- trunk/mx4j/src/test/test/MutableInteger.java 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/src/test/test/MutableInteger.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) The MX4J Contributors.
- * All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 1.0.
- * See the terms of the MX4J License in the documentation provided with this software.
- */
-
-package test;
-
-/**
- * @version $Revision$
- * @see
- */
-public class MutableInteger
-{
- private int m_value;
-
- public MutableInteger(int value)
- {
- m_value = value;
- }
-
- public int get()
- {
- return m_value;
- }
-
- public void set(int value)
- {
- m_value = value;
- }
-}
Deleted: trunk/mx4j/src/test/test/MutableLong.java
===================================================================
--- trunk/mx4j/src/test/test/MutableLong.java 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/src/test/test/MutableLong.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) The MX4J Contributors.
- * All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 1.0.
- * See the terms of the MX4J License in the documentation provided with this software.
- */
-
-package test;
-
-/**
- * @version $Revision$
- * @see
- */
-public class MutableLong
-{
- private long m_value;
-
- public MutableLong(long value)
- {
- m_value = value;
- }
-
- public long get()
- {
- return m_value;
- }
-
- public void set(long value)
- {
- m_value = value;
- }
-}
Deleted: trunk/mx4j/src/test/test/MutableObject.java
===================================================================
--- trunk/mx4j/src/test/test/MutableObject.java 2006-11-23 23:34:47 UTC (rev 2252)
+++ trunk/mx4j/src/test/test/MutableObject.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) The MX4J Contributors.
- * All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 1.0.
- * See the terms of the MX4J License in the documentation provided with this software.
- */
-
-package test;
-
-/**
- * @version $Revision$
- */
-public class MutableObject
-{
- private Object object;
-
- public MutableObject(Object object)
- {
- this.object = object;
- }
-
- public synchronized Object get()
- {
- return object;
- }
-
- public synchronized void set(Object object)
- {
- this.object = object;
- }
-}
Added: trunk/mx4j/tests/pom.xml
===================================================================
--- trunk/mx4j/tests/pom.xml (rev 0)
+++ trunk/mx4j/tests/pom.xml 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,23 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>mx4j</groupId>
+ <artifactId>mx4j</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>mx4j</groupId>
+ <artifactId>mx4j-tests</artifactId>
+ <name>MX4J :: TESTS</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
Property changes on: trunk/mx4j/tests/pom.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: trunk/mx4j/tests/src/main/java/mx4j/MX4JTestCase.java (from rev 2250, trunk/mx4j/src/test/test/MX4JTestCase.java)
===================================================================
--- trunk/mx4j/tests/src/main/java/mx4j/MX4JTestCase.java (rev 0)
+++ trunk/mx4j/tests/src/main/java/mx4j/MX4JTestCase.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) The MX4J Contributors.
+ * All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 1.0.
+ * See the terms of the MX4J License in the documentation provided with this software.
+ */
+
+package mx4j;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * Base class for MX4J tests
+ *
+ * @version $Revision$
+ */
+public abstract class MX4JTestCase extends TestCase
+{
+ public MX4JTestCase(String name)
+ {
+ super(name);
+ }
+
+ protected MBeanServer newMBeanServer()
+ {
+ return MBeanServerFactory.newMBeanServer();
+ }
+
+ protected ClassLoader createMX4JClassLoader() throws MalformedURLException
+ {
+ File jmx = new File("dist/test/mx4j-jmx.jar");
+ File impl = new File("dist/test/mx4j-impl.jar");
+ return new URLClassLoader(new URL[]{jmx.toURL(), impl.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createJMXRIClassLoader() throws MalformedURLException
+ {
+ File jmxri = new File("dist/test/jmxri.jar");
+ if (!jmxri.exists()) fail("JMXRI jar is not available");
+ return new URLClassLoader(new URL[]{jmxri.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createJMXRIWithMX4JImplClassLoader() throws MalformedURLException
+ {
+ File jmxri = new File("dist/test/jmxri.jar");
+ if (!jmxri.exists()) fail("JMXRI jar is not available");
+ File mx4j = new File("dist/test/mx4j-impl.jar");
+ return new URLClassLoader(new URL[]{jmxri.toURL(), mx4j.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createMX4JWithTestsClassLoader() throws MalformedURLException
+ {
+ File jmx = new File("dist/test/mx4j-jmx.jar");
+ File impl = new File("dist/test/mx4j-impl.jar");
+ File tests = new File("dist/test/mx4j-tests.jar");
+ return new URLClassLoader(new URL[]{jmx.toURL(), impl.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createRemoteMX4JWithTestsClassLoader() throws MalformedURLException
+ {
+ File jmx = new File("dist/test/mx4j-jmx.jar");
+ File impl = new File("dist/test/mx4j-impl.jar");
+ File rjmx = new File("dist/test/mx4j-rjmx.jar");
+ File rimpl = new File("dist/test/mx4j-rimpl.jar");
+ File tests = new File("dist/test/mx4j-tests.jar");
+ File jaas = new File("dist/test/jaas.jar");
+ return new URLClassLoader(new URL[]{jaas.toURL(), jmx.toURL(), impl.toURL(), rjmx.toURL(), rimpl.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createJMXRIWithTestsClassLoader() throws MalformedURLException
+ {
+ File jmxri = new File("dist/test/jmxri.jar");
+ if (!jmxri.exists()) fail("JMXRI jar is not available");
+ File tests = new File("dist/test/mx4j-tests.jar");
+ return new URLClassLoader(new URL[]{jmxri.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createRemoteJMXRIWithTestsClassLoader() throws MalformedURLException
+ {
+ File jmx = new File("dist/test/jmxri.jar");
+ if (!jmx.exists()) fail("JMXRI jar is not available");
+ File rjmx = new File("dist/test/jmxremote.jar");
+ if (!rjmx.exists()) fail("JMX Remote jar is not available");
+ File tests = new File("dist/test/mx4j-tests.jar");
+ File jaas = new File("dist/test/jaas.jar");
+ return new URLClassLoader(new URL[]{jaas.toURL(), jmx.toURL(), rjmx.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected ClassLoader createOptionalRemoteJMXRIWithTestsClassLoader() throws MalformedURLException
+ {
+ File jmx = new File("dist/test/jmxri.jar");
+ if (!jmx.exists()) fail("JMXRI jar is not available");
+ File rjmx = new File("dist/test/jmxremote.jar");
+ if (!rjmx.exists()) fail("JMX Remote jar is not available");
+ File orjmx = new File("dist/test/jmxremote_optional.jar");
+ if (!orjmx.exists()) fail("JMX Optional Remote jar is not available");
+ File tests = new File("dist/test/mx4j-tests.jar");
+ return new URLClassLoader(new URL[]{jmx.toURL(), rjmx.toURL(), orjmx.toURL(), tests.toURL()}, getClass().getClassLoader().getParent());
+ }
+
+ protected void sleep(long time)
+ {
+ try
+ {
+ Thread.sleep(time);
+ }
+ catch (InterruptedException x)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+}
Property changes on: trunk/mx4j/tests/src/main/java/mx4j/MX4JTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/mx4j/tests/src/main/java/mx4j/MultiThreadTestRunner.java (from rev 2250, trunk/mx4j/src/test/test/MultiThreadTestRunner.java)
===================================================================
--- trunk/mx4j/tests/src/main/java/mx4j/MultiThreadTestRunner.java (rev 0)
+++ trunk/mx4j/tests/src/main/java/mx4j/MultiThreadTestRunner.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) The MX4J Contributors.
+ * All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 1.0.
+ * See the terms of the MX4J License in the documentation provided with this software.
+ */
+
+package mx4j;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @version $Revision$
+ */
+public class MultiThreadTestRunner
+{
+ public abstract static class Test
+ {
+ private List throwables = new ArrayList();
+
+ public abstract void test() throws Exception;
+
+ private synchronized void addThrowable(Throwable x)
+ {
+ throwables.add(x);
+ }
+
+ private synchronized Throwable[] getThrowables()
+ {
+ return (Throwable[])throwables.toArray(new Throwable[throwables.size()]);
+ }
+ }
+
+ private class MultiThrowable extends Exception
+ {
+ private final Throwable[] throwables;
+
+ public MultiThrowable(Throwable[] throwables)
+ {
+ this.throwables = throwables;
+ }
+
+ public void printStackTrace(PrintStream stream)
+ {
+ synchronized (stream)
+ {
+ stream.println(this);
+ for (int i = 0; i < throwables.length; ++i) throwables[i].printStackTrace(stream);
+ }
+ }
+
+ public void printStackTrace(PrintWriter writer)
+ {
+ synchronized (writer)
+ {
+ writer.println(this);
+ for (int i = 0; i < throwables.length; ++i) throwables[i].printStackTrace(writer);
+ }
+ }
+ }
+
+ private final int threads;
+ private final int iterations;
+
+ public MultiThreadTestRunner(int threads, int iterations)
+ {
+ this.threads = threads;
+ this.iterations = iterations;
+ }
+
+ public void run(final Test test) throws Exception
+ {
+ Thread[] runners = new Thread[threads];
+ for (int i = 0; i < threads; ++i)
+ {
+ runners[i] = new Thread(new Runnable()
+ {
+ public void run()
+ {
+ for (int i = 0; i < iterations; ++i)
+ {
+ try
+ {
+ test.test();
+ }
+ catch (Throwable x)
+ {
+ test.addThrowable(x);
+ }
+ }
+ }
+ });
+ }
+
+ for (int i = 0; i < threads; ++i) runners[i].start();
+
+ for (int i = 0; i < threads; ++i) runners[i].join();
+
+ Throwable[] failures = test.getThrowables();
+ if (failures != null && failures.length > 0) throw new MultiThrowable(failures);
+ }
+}
Property changes on: trunk/mx4j/tests/src/main/java/mx4j/MultiThreadTestRunner.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/mx4j/tests/src/main/java/mx4j/MutableBoolean.java (from rev 2250, trunk/mx4j/src/test/test/MutableBoolean.java)
===================================================================
--- trunk/mx4j/tests/src/main/java/mx4j/MutableBoolean.java (rev 0)
+++ trunk/mx4j/tests/src/main/java/mx4j/MutableBoolean.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) The MX4J Contributors.
+ * All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 1.0.
+ * See the terms of the MX4J License in the documentation provided with this software.
+ */
+
+package mx4j;
+
+/**
+ * @version $Revision$
+ * @see
+ */
+public class MutableBoolean
+{
+ private boolean m_value;
+
+ public MutableBoolean(boolean value)
+ {
+ set(value);
+ }
+
+ public boolean get()
+ {
+ return m_value;
+ }
+
+ public void set(boolean value)
+ {
+ m_value = value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/mx4j/tests/src/main/java/mx4j/MutableBoolean.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/mx4j/tests/src/main/java/mx4j/MutableInteger.java (from rev 2250, trunk/mx4j/src/test/test/MutableInteger.java)
===================================================================
--- trunk/mx4j/tests/src/main/java/mx4j/MutableInteger.java (rev 0)
+++ trunk/mx4j/tests/src/main/java/mx4j/MutableInteger.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) The MX4J Contributors.
+ * All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 1.0.
+ * See the terms of the MX4J License in the documentation provided with this software.
+ */
+
+package mx4j;
+
+/**
+ * @version $Revision$
+ * @see
+ */
+public class MutableInteger
+{
+ private int m_value;
+
+ public MutableInteger(int value)
+ {
+ m_value = value;
+ }
+
+ public int get()
+ {
+ return m_value;
+ }
+
+ public void set(int value)
+ {
+ m_value = value;
+ }
+}
Property changes on: trunk/mx4j/tests/src/main/java/mx4j/MutableInteger.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/mx4j/tests/src/main/java/mx4j/MutableLong.java (from rev 2250, trunk/mx4j/src/test/test/MutableLong.java)
===================================================================
--- trunk/mx4j/tests/src/main/java/mx4j/MutableLong.java (rev 0)
+++ trunk/mx4j/tests/src/main/java/mx4j/MutableLong.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) The MX4J Contributors.
+ * All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 1.0.
+ * See the terms of the MX4J License in the documentation provided with this software.
+ */
+
+package mx4j;
+
+/**
+ * @version $Revision$
+ * @see
+ */
+public class MutableLong
+{
+ private long m_value;
+
+ public MutableLong(long value)
+ {
+ m_value = value;
+ }
+
+ public long get()
+ {
+ return m_value;
+ }
+
+ public void set(long value)
+ {
+ m_value = value;
+ }
+}
Property changes on: trunk/mx4j/tests/src/main/java/mx4j/MutableLong.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/mx4j/tests/src/main/java/mx4j/MutableObject.java (from rev 2250, trunk/mx4j/src/test/test/MutableObject.java)
===================================================================
--- trunk/mx4j/tests/src/main/java/mx4j/MutableObject.java (rev 0)
+++ trunk/mx4j/tests/src/main/java/mx4j/MutableObject.java 2006-11-24 13:59:30 UTC (rev 2253)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) The MX4J Contributors.
+ * All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 1.0.
+ * See the terms of the MX4J License in the documentation provided with this software.
+ */
+
+package mx4j;
+
+/**
+ * @version $Revision$
+ */
+public class MutableObject
+{
+ private Object object;
+
+ public MutableObject(Object object)
+ {
+ this.object = object;
+ }
+
+ public synchronized Object get()
+ {
+ return object;
+ }
+
+ public synchronized void set(Object object)
+ {
+ this.object = object;
+ }
+}
Property changes on: trunk/mx4j/tests/src/main/java/mx4j/MutableObject.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV