commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1702353 - in /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6: ./ generic/
Date Fri, 11 Sep 2015 00:10:57 GMT
Author: sebb
Date: Fri Sep 11 00:10:56 2015
New Revision: 1702353

URL: http://svn.apache.org/r1702353
Log:
Ensure interface classes are deprecated

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConst.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IDIV.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IREM.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LDIV.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LREM.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConst.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConst.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConst.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConst.java Fri
Sep 11 00:10:56 2015
@@ -1,6 +1,41 @@
 package org.apache.commons.bcel6;
 
-public abstract class ExceptionConst implements ExceptionConstants {
+public final class ExceptionConst {
+
+    /** The mother of all exceptions
+     */
+    public static final Class<Throwable> THROWABLE = Throwable.class;
+    /** Super class of any run-time exception
+     */
+    public static final Class<RuntimeException> RUNTIME_EXCEPTION = RuntimeException.class;
+    /** Super class of any linking exception (aka Linkage Error)
+     */
+    public static final Class<LinkageError> LINKING_EXCEPTION = LinkageError.class;
+    /** Linking Exceptions
+     */
+    public static final Class<ClassCircularityError> CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
+    public static final Class<ClassFormatError> CLASS_FORMAT_ERROR = ClassFormatError.class;
+    public static final Class<ExceptionInInitializerError> EXCEPTION_IN_INITIALIZER_ERROR
= ExceptionInInitializerError.class;
+    public static final Class<IncompatibleClassChangeError> INCOMPATIBLE_CLASS_CHANGE_ERROR
= IncompatibleClassChangeError.class;
+    public static final Class<AbstractMethodError> ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
+    public static final Class<IllegalAccessError> ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
+    public static final Class<InstantiationError> INSTANTIATION_ERROR = InstantiationError.class;
+    public static final Class<NoSuchFieldError> NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
+    public static final Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
+    public static final Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
+    public static final Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
+    public static final Class<VerifyError> VERIFY_ERROR = VerifyError.class;
+    /* UnsupportedClassVersionError is new in JDK 1.2 */
+//    public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
+    /** Run-Time Exceptions 
+     */
+    public static final Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class;
+    public static final Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
+                                                            = ArrayIndexOutOfBoundsException.class;
+    public static final Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class;
+    public static final Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION
= NegativeArraySizeException.class;
+    public static final Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class;
+    public static final Class<IllegalMonitorStateException> ILLEGAL_MONITOR_STATE =
IllegalMonitorStateException.class;
 
     /**
      * Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
Fri Sep 11 00:10:56 2015
@@ -21,7 +21,9 @@ package org.apache.commons.bcel6;
  * Exception constants.
  *
  * @version $Id$
+ * @deprecated DO NOT USE - use ExceptionConst instead
  */
+@Deprecated
 public interface ExceptionConstants {
 
     /** The mother of all exceptions

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
Fri Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /** 
  * ARRAYLENGTH -  Get length of array
  * <PRE>Stack: ..., arrayref -&gt; ..., length</PRE>
@@ -37,7 +39,7 @@ public class ARRAYLENGTH extends Instruc
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.NULL_POINTER_EXCEPTION
+            ExceptionConst.NULL_POINTER_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java Fri
Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /** 
  * ATHROW -  Throw exception
  * <PRE>Stack: ..., objectref -&gt; objectref</PRE>
@@ -38,7 +40,7 @@ public class ATHROW extends Instruction
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.THROWABLE
+            ExceptionConst.THROWABLE
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IDIV.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IDIV.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IDIV.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IDIV.java Fri
Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /**
  * IDIV - Divide ints
  * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
@@ -37,7 +39,7 @@ public class IDIV extends ArithmeticInst
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+            ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IREM.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IREM.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IREM.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/IREM.java Fri
Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /**
  * IREM - Remainder of int
  * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
@@ -37,7 +39,7 @@ public class IREM extends ArithmeticInst
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+            ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LDIV.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LDIV.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LDIV.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LDIV.java Fri
Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /**
  * LDIV - Divide longs
  * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
@@ -34,7 +36,7 @@ public class LDIV extends ArithmeticInst
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+            ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LREM.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LREM.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LREM.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/LREM.java Fri
Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /**
  * LREM - Remainder of long
  * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
@@ -33,7 +35,7 @@ public class LREM extends ArithmeticInst
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+            ExceptionConst.ARITHMETIC_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java
Fri Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /** 
  * MONITORENTER - Enter monitor for object
  * <PRE>Stack: ..., objectref -&gt; ...</PRE>
@@ -33,7 +35,7 @@ public class MONITORENTER extends Instru
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.NULL_POINTER_EXCEPTION
+            ExceptionConst.NULL_POINTER_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java
Fri Sep 11 00:10:56 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.bcel6.generic;
 
+import org.apache.commons.bcel6.ExceptionConst;
+
 /** 
  * MONITOREXIT - Exit monitor for object
  * <PRE>Stack: ..., objectref -&gt; ...</PRE>
@@ -33,7 +35,7 @@ public class MONITOREXIT extends Instruc
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.NULL_POINTER_EXCEPTION
+            ExceptionConst.NULL_POINTER_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java
Fri Sep 11 00:10:56 2015
@@ -20,6 +20,7 @@ package org.apache.commons.bcel6.generic
 import java.io.DataOutputStream;
 import java.io.IOException;
 
+import org.apache.commons.bcel6.ExceptionConst;
 import org.apache.commons.bcel6.util.ByteSequence;
 
 /** 
@@ -103,7 +104,7 @@ public class NEWARRAY extends Instructio
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            org.apache.commons.bcel6.ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION
+            ExceptionConst.NEGATIVE_ARRAY_SIZE_EXCEPTION
         };
     }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java?rev=1702353&r1=1702352&r2=1702353&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java
Fri Sep 11 00:10:56 2015
@@ -18,7 +18,7 @@
 package org.apache.commons.bcel6.generic;
 
 import org.apache.commons.bcel6.Constants;
-import org.apache.commons.bcel6.ExceptionConstants;
+import org.apache.commons.bcel6.ExceptionConst;
 
 /**
  * Super class for the xRETURN family of instructions.
@@ -68,7 +68,7 @@ public abstract class ReturnInstruction
     @Override
     public Class<?>[] getExceptions() {
         return new Class[] {
-            ExceptionConstants.ILLEGAL_MONITOR_STATE
+            ExceptionConst.ILLEGAL_MONITOR_STATE
         };
     }
 



Mime
View raw message