commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r791076 - in /commons/sandbox/runtime/trunk/src: main/java/org/apache/commons/runtime/ test/org/apache/commons/runtime/
Date Sat, 04 Jul 2009 07:46:45 GMT
Author: mturk
Date: Sat Jul  4 07:46:45 2009
New Revision: 791076

URL: http://svn.apache.org/viewvc?rev=791076&view=rev
Log:
Add ConstPointer public interface. Used instead Const annotation

Added:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer.java
  (with props)
Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer32.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer64.java
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java

Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer.java?rev=791076&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer.java
(added)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer.java
Sat Jul  4 07:46:45 2009
@@ -0,0 +1,30 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+
+import org.apache.commons.runtime.util.Utils;
+
+/**
+ * Represents the {@code const} Pointer.
+ *
+ * @since Runtime 1.0
+ */
+public interface ConstPointer extends Pointer
+{
+
+}
+

Propchange: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer32.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer32.java?rev=791076&r1=791075&r2=791076&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer32.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer32.java
Sat Jul  4 07:46:45 2009
@@ -24,7 +24,7 @@
  * @since Runtime 1.0
  */
  @Const
-final class ConstPointer32 extends Pointer32
+final class ConstPointer32 extends Pointer32 implements ConstPointer
 {
 
     private ConstPointer32()

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer64.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer64.java?rev=791076&r1=791075&r2=791076&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer64.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ConstPointer64.java
Sat Jul  4 07:46:45 2009
@@ -24,7 +24,7 @@
  * @since Runtime 1.0
  */
 @Const
-final class ConstPointer64 extends Pointer64
+final class ConstPointer64 extends Pointer64 implements ConstPointer
 {
 
     private ConstPointer64()

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java?rev=791076&r1=791075&r2=791076&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java Sat
Jul  4 07:46:45 2009
@@ -328,6 +328,7 @@
     {
         DirectBuffer b = test039(1000);
         assertNotNull("DirectBuffer", b);
+        assertTrue("Not a DirectBuffer", b instanceof DirectBuffer);
         b.free();
         b = null;
         System.gc();
@@ -341,6 +342,7 @@
     {
         Pointer c = test041(0);
         assertNotNull("ConstPointer", c);
+        assertTrue("Not a ConstPointer", c instanceof ConstPointer);
         try {
             c.poke(0, 1);
             fail("Missing UnsupportedOperationException");
@@ -351,7 +353,6 @@
             fail("Expecting UnsupportedOperationException but was " + ex);
         }
 
-
         c.free();
         c = null;
         System.gc();



Mime
View raw message