oscript.data
Class ConstructorScope

java.lang.Object
  extended byoscript.data.Value
      extended byoscript.data.Scope
          extended byoscript.data.BasicScope
              extended byoscript.data.FunctionScope
                  extended byoscript.data.ConstructorScope
All Implemented Interfaces:
java.io.Serializable

public class ConstructorScope
extends FunctionScope

The ConstructorScope to implement the scope for a constructor, acting as a switch to cause private variables to be declared in a scope private to the constructor while public and protected members are in a scope shared by any parent and child classes.

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

Field Summary
 
Fields inherited from class oscript.data.FunctionScope
fxn
 
Fields inherited from class oscript.data.BasicScope
members, mixins, smit
 
Fields inherited from class oscript.data.Scope
previous
 
Fields inherited from class oscript.data.Value
DEBUG, MEMBER_NAMES, NULL, PARENT_TYPE_NAME, TYPE, TYPE_NAME, UNDEFINED
 
Method Summary
 Value createMember(int id, int attr)
          Create a member of this object with the specified value.
 Value getThis()
          Lookup the "this" within a scope.
 void mixin(Value val)
          "mixin" the specified variable into the current scope.
 
Methods inherited from class oscript.data.FunctionScope
getCallee, getMemberImpl
 
Methods inherited from class oscript.data.BasicScope
__getInstanceMember, free, getMember, getSafeCopy, getType, getTypeImpl, isSafe, lookupInScope, populateMemberSet, reset
 
Methods inherited from class oscript.data.Scope
__setJavaObject, createMember, createMember, findDesc, getPreviousScope, lookupInScope, lookupInScope
 
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, castToString, elementAt, elementsAt, getMember, getMember, getMember, getMember, getMember, getMonitor, 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
 

Method Detail

createMember

public Value createMember(int id,
                          int attr)
Create a member of this object with the specified value. This actually creates the member in the previous scope.

Overrides:
createMember in class BasicScope
Parameters:
id - the id of the symbol that maps to the member
attr - the attributes of the object (see Reference.)
See Also:
Reference

mixin

public void mixin(Value val)
"mixin" the specified variable into the current scope.

Overrides:
mixin in class BasicScope
Parameters:
val - the value to mixin to this scope

getThis

public Value getThis()
Lookup the "this" within a scope. The "this" is actually a union of this scope which contains private members and args, and the script object itself.

Overrides:
getThis in class Scope
Returns:
the "this" ScriptObject within this scope