oscript.data
Class OObject

java.lang.Object
  extended byoscript.data.Value
      extended byoscript.data.OObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Database, JavaPackageWrapper, OArray, OBoolean, OExactNumber, OException, OInexactNumber, OString, Proxy, RegExp, RegExpResult, ScriptPackage

public class OObject
extends Value

The built-in type Object, which is the type that implements the root of the inheritance hierarchy of all language types. All types either directly or indirectly inherit from this class.

Some of the class hierarchy should be re-thought... perhaps the methods that are implemented in Value should be moved to this class?

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

Field Summary
static NodeEvaluator EMPTY_EXPR_LIST_EVALUATOR
          When a script function doesn't explicitly extend another type, it implicitly subclasses Object, and uses this expression-list when calling the super-class constructor.
static java.lang.String[] MEMBER_NAMES
           
static java.lang.String PARENT_TYPE_NAME
           
static Value TYPE
          The type object for an instance of Object.
static java.lang.String TYPE_NAME
           
 
Fields inherited from class oscript.data.Value
DEBUG, NULL, UNDEFINED
 
Constructor Summary
OObject()
          Class Constructor.
OObject(MemberTable args)
          Class Constructor.
 
Method Summary
 java.lang.String castToString()
          Convert this object to a native java String value.
 Value getMember(int id, boolean exception)
          Get a member of this object.
protected  Value getTypeImpl()
          Get the type of this object.
protected  void populateMemberSet(java.util.Set s, boolean debugger)
          Derived classes that implement getMember(int, boolean) should also implement this.
 
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, castToJavaObject, elementAt, elementsAt, getMember, getMember, getMember, getMember, getMember, getMonitor, getType, getTypeMember, getTypeMember, isA, length, memberSet, 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 Object.


PARENT_TYPE_NAME

public static final java.lang.String PARENT_TYPE_NAME

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

EMPTY_EXPR_LIST_EVALUATOR

public static final NodeEvaluator EMPTY_EXPR_LIST_EVALUATOR
When a script function doesn't explicitly extend another type, it implicitly subclasses Object, and uses this expression-list when calling the super-class constructor.

Constructor Detail

OObject

public OObject()
Class Constructor.


OObject

public OObject(MemberTable args)
Class Constructor. This is the constructor that gets called via an BuiltinType instance.

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

getTypeImpl

protected Value getTypeImpl()
Get the type of this object. The returned type doesn't have to take into account the possibility of a script type extending a built-in type, since that is handled by Value.getType().

Specified by:
getTypeImpl in class Value
Returns:
the object's type

castToString

public java.lang.String castToString()
                              throws PackagedScriptObjectException
Convert this object to a native java String value.

Overrides:
castToString in class Value
Returns:
a String value
Throws:
PackagedObjectException(NoSuchMethodException)
PackagedScriptObjectException

getMember

public Value getMember(int id,
                       boolean exception)
                throws PackagedScriptObjectException
Get a member of this object.

Overrides:
getMember in class Value
Returns:
a reference to the member
Throws:
PackagedScriptObjectException(NoSuchMemberException)
PackagedScriptObjectException

populateMemberSet

protected void populateMemberSet(java.util.Set s,
                                 boolean debugger)
Derived classes that implement getMember(int, boolean) should also implement this.

Overrides:
populateMemberSet in class Value
Parameters:
s - the set to populate
debugger - true if being used by debugger, in which case both public and private/protected field names should be returned
See Also:
getMember(int, boolean)