oscript.data
Class JavaInnerClassWrapper

java.lang.Object
  extended byoscript.data.Value
      extended byoscript.data.Type
          extended byoscript.data.JavaClassWrapper
              extended byoscript.data.JavaInnerClassWrapper
All Implemented Interfaces:
java.io.Serializable

public class JavaInnerClassWrapper
extends JavaClassWrapper

Inner class are basically just regular classes, except that we insert an extra arg when calling the constructor... the instance of the enclosing java object.

The way this works now is a bunch of extra overhead, and a bit lame, because we end up creating a JavaInnerClassWrapper for every access to the inner class (ie. OuterClass.InnerClass), because we need to associate the object with the class instance. This means we end up doing the init stuff, not once per class, but once per class per outer object.

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

Nested Class Summary
 
Nested classes inherited from class oscript.data.JavaClassWrapper
JavaClassWrapper.Base, JavaClassWrapper.Derived, JavaClassWrapper.JavaClassWrapperImpl
 
Field Summary
 
Fields inherited from class oscript.data.JavaClassWrapper
impl, javaClass, MEMBER_NAMES, PARENT_TYPE_NAME, TYPE, TYPE_NAME, wrapperImpl
 
Fields inherited from class oscript.data.Type
HIDDEN_TYPE
 
Fields inherited from class oscript.data.Value
DEBUG, NULL, UNDEFINED
 
Constructor Summary
JavaInnerClassWrapper(Value obj, java.lang.Class javaClass)
          Class Constructor.
 
Method Summary
protected  java.lang.Object doConstruct(StackFrame sf, MemberTable args, boolean isWrapper)
          Overloaded to add the "this" object to the argument list, because it is an implicit arg to the inner class constructor.
 
Methods inherited from class oscript.data.JavaClassWrapper
callAsConstructor, callAsExtends, castToJavaObject, castToString, forName, getClassLoader, getClassWrapper, getClassWrapper, getMember, getName, getTypeImpl, getTypeMember, getTypeMemberImpl, init, isA, populateMemberSet, populateTypeMemberSet
 
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, callAsExtends, callAsExtends, callAsFunction, callAsFunction, callAsFunction, castToBoolean, castToExactNumber, castToInexactNumber, elementAt, elementsAt, getMember, getMember, getMember, getMember, getMember, getMonitor, getType, getTypeMember, length, memberSet, noSuchMember, opAssign, 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
 

Constructor Detail

JavaInnerClassWrapper

public JavaInnerClassWrapper(Value obj,
                             java.lang.Class javaClass)
Class Constructor.

Parameters:
obj - the instance of the outer object
javaClass - the java class this object is a wrapper for
Method Detail

doConstruct

protected java.lang.Object doConstruct(StackFrame sf,
                                       MemberTable args,
                                       boolean isWrapper)
Overloaded to add the "this" object to the argument list, because it is an implicit arg to the inner class constructor.

Overrides:
doConstruct in class JavaClassWrapper