ref_send API 2.17
defensive programming in Java

org.joe_e
Class JoeE

java.lang.Object
  extended by org.joe_e.JoeE

public class JoeE
extends java.lang.Object

Joe-E core library functions. These provide fundamental features, similar to the methods in java.lang.System, such as the interface to the overlay type system.


Method Summary
static java.lang.Error abort(java.lang.Error reason)
          Aborts the current flow of control.
static boolean instanceOf(java.lang.Object obj, java.lang.Class<?> type)
          Tests whether the specified object belongs to the specified type in the overlay type system.
static boolean isFrozen(java.lang.Object x)
          Is the object one-level deep immutable?
static boolean isSubtypeOf(java.lang.Class<?> c1, java.lang.Class<?> c2)
          Tests whether the first class is a subtype of the second in the overlay type system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instanceOf

public static boolean instanceOf(java.lang.Object obj,
                                 java.lang.Class<?> type)
Tests whether the specified object belongs to the specified type in the overlay type system. The equivalent of the Java instanceof operator, for the overlay type system.

Parameters:
obj - the object to test
type - the type to test membership of
Returns:
true if the specified object belongs to the specified type in the overlay type system.

isSubtypeOf

public static boolean isSubtypeOf(java.lang.Class<?> c1,
                                  java.lang.Class<?> c2)
Tests whether the first class is a subtype of the second in the overlay type system.

Parameters:
c1 - the potential subtype
c2 - the potential supertype
Returns:
true if the first argument is a subtype of the second in the overlay type system

abort

public static java.lang.Error abort(java.lang.Error reason)
Aborts the current flow of control. This method invokes the currently registered error handler, which should preclude continued execution of Joe-E code.

Parameters:
reason - reason for the abort
Returns:
an error to throw

isFrozen

public static boolean isFrozen(java.lang.Object x)
Is the object one-level deep immutable?

Parameters:
x - candidate object
Returns:
true if x is one-level deep immutable, false if it might not be

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.