oscript.data
Class OJavaException

java.lang.Object
  extended byoscript.data.Value
      extended byoscript.data.OObject
          extended byoscript.data.OException
              extended byoscript.data.OJavaException
All Implemented Interfaces:
java.io.Serializable

public class OJavaException
extends OException

This class wraps a java exception object. At some point, we could perhaps make this a script type...

Version:
1.7
Author:
Rob Clark (rob@ti.com)
See Also:
Serialized Form

Field Summary
static java.lang.String[] MEMBER_NAMES
           
static java.lang.String PARENT_TYPE_NAME
           
static Value TYPE
          The type object for an instance of JavaException.
static java.lang.String TYPE_NAME
           
 
Fields inherited from class oscript.data.OObject
EMPTY_EXPR_LIST_EVALUATOR
 
Fields inherited from class oscript.data.Value
DEBUG, NULL, UNDEFINED
 
Constructor Summary
OJavaException(MemberTable args)
          Class Constructor.
OJavaException(java.lang.Throwable t)
          Class Constructor.
OJavaException(java.lang.Throwable t, Value ot)
           
 
Method Summary
 java.lang.Object castToJavaObject()
          Convert this object to a native java Object value.
 Value getJavaException()
           
 Value getMember(int id, boolean exception)
          Get a member of this object.
 java.lang.Object getMonitor()
          Return the object used for implementing synchronized.
 Value getType()
          Get the type of this object.
static PackagedScriptObjectException makeJavaExceptionWrapper(java.lang.Throwable t)
           
 java.util.Set memberSet()
          Returns the names of the members of this object.
 
Methods inherited from class oscript.data.OException
castToString, getArg0, getMessage, getTypeImpl, preserveStackFrame, stackFrameIterator
 
Methods inherited from class oscript.data.OObject
populateMemberSet
 
Methods inherited from class oscript.data.Value
_getTypeMember, _populateTypeMemberSet, bopBitwiseAnd, bopBitwiseAndR, bopBitwiseOr, bopBitwiseOrR, bopBitwiseXor, bopBitwiseXorR, bopCast, bopCastR, bopDivide, bopDivideR, bopEquals, bopEqualsR, bopGreaterThan, bopGreaterThanOrEquals, bopGreaterThanOrEqualsR, bopGreaterThanR, bopInstanceOf, bopInstanceOfR, bopLeftShift, bopLeftShiftR, bopLessThan, bopLessThanOrEquals, bopLessThanOrEqualsR, bopLessThanR, bopLogicalAnd, bopLogicalAndR, bopLogicalOr, bopLogicalOrR, bopMinus, bopMinusR, bopMultiply, bopMultiplyR, bopNotEquals, bopNotEqualsR, bopPlus, bopPlusR, bopRemainder, bopRemainderR, bopSignedRightShift, bopSignedRightShiftR, bopUnsignedRightShift, bopUnsignedRightShiftR, callAsConstructor, callAsConstructor, callAsConstructor, callAsExtends, callAsExtends, callAsExtends, callAsFunction, callAsFunction, callAsFunction, castToBoolean, castToExactNumber, castToInexactNumber, elementAt, elementsAt, getMember, getMember, getMember, getMember, getMember, getTypeMember, getTypeMember, isA, length, noSuchMember, opAssign, populateTypeMemberSet, readExternal, toString, unhand, uopBitwiseNot, uopDecrement, uopIncrement, uopLogicalNot, uopMinus, uopPlus, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final Value TYPE
The type object for an instance of JavaException.


PARENT_TYPE_NAME

public static final java.lang.String PARENT_TYPE_NAME
See Also:
Constant Field Values

TYPE_NAME

public static final java.lang.String TYPE_NAME
See Also:
Constant Field Values

MEMBER_NAMES

public static final java.lang.String[] MEMBER_NAMES
Constructor Detail

OJavaException

public OJavaException(java.lang.Throwable t)
Class Constructor.

Parameters:
t - a java exception

OJavaException

public OJavaException(java.lang.Throwable t,
                      Value ot)

OJavaException

public OJavaException(MemberTable args)
Class Constructor. This is the constructor that is called via a BuiltinType instance.

Parameters:
args - arguments to this constructor
Throws:
PackagedScriptObjectException(Exception) - if wrong number of args
Method Detail

makeJavaExceptionWrapper

public static final PackagedScriptObjectException makeJavaExceptionWrapper(java.lang.Throwable t)

getMonitor

public java.lang.Object getMonitor()
Description copied from class: Value
Return the object used for implementing synchronized. For a normal script object, the object is it's own monitor. For a java object, it is the java object rather than the JavaObjectWrapper.

Overrides:
getMonitor in class Value
Returns:
the object to synchronize on

castToJavaObject

public java.lang.Object castToJavaObject()
Description copied from class: Value
Convert this object to a native java Object value.

Overrides:
castToJavaObject in class Value
Returns:
a java object

getMember

public Value getMember(int id,
                       boolean exception)
                throws PackagedScriptObjectException
Description copied from class: OObject
Get a member of this object.

Overrides:
getMember in class OObject
Returns:
a reference to the member
Throws:
PackagedScriptObjectException

getType

public Value getType()
Description copied from class: Value
Get the type of this object.

Overrides:
getType in class Value
Returns:
the object's type

memberSet

public final java.util.Set memberSet()
Description copied from class: Value
Returns the names of the members of this object.

Overrides:
memberSet in class Value
Returns:
a collection view of the names of the members of this object

getJavaException

public Value getJavaException()