| java.lang.Object oscript.data.Value oscript.data.Type oscript.data.JavaClassWrapper oscript.data.BuiltinType
BuiltinType | public class BuiltinType extends JavaClassWrapper (Code) | | A BuiltinType instance is used to represent a built-in type.
This is similar to JavaClassWrapper , in that it allows a java
type to be sub-classed or instantiated, but it's difference is that it
restricts access. Because the Value interface has dummy
methods for all the possible methods it's subclass may implement, we have
to do this to prevent the built-in types from appearing to have methods
that they don't have. For example:
var m = true.bopPlus;
The Value dummy methods throw the appropriate exceptions
if you try and use a non-existant method, for example:
var v = true + false;
To accomodate the possibility of things changing between when an object
referencing this object is serialized, and when it is read back from a
serial data stream (in a different invokation of the JVM), only the class-
name is stored. The other paramters are loaded as via reflection as static
fields of the named class:
- public static String PARENT_TYPE_NAME; // class-name
- public static String TYPE_NAME; // the name of this type
- public static String[] MEMBER_NAMES; // names of members of this type
author: Rob Clark (rob@ti.com) author: version: 1.38 |
getTypeMember | protected Value getTypeMember(Value obj, int id)(Code) | | Overloaded to hide "non-existant" methods. (Ie. methods from Value
base class.)
Parameters: obj - an object of this type Parameters: id - the id of the symbol that maps to the member a reference to the member, or null |
init | protected synchronized void init()(Code) | | |
isA | public boolean isA(Value type)(Code) | | If this object is a type, determine if an instance of this type is
an instance of the specified type, ie. if this is type ,
or a subclass.
Parameters: type - the type to compare this type to true or false throws: PackagedScriptObjectException - (NoSuchMemberException) |
makeBuiltinType | final public static BuiltinType makeBuiltinType(String className)(Code) | | Get an instance of a built-in type. This method ensures that only a single
instance representing a type gets created, regardless of the number of
times this is called. This is needed to keep things sane when serialization
is going on.
Parameters: className - the name of the java class implementing the built-in type. |
populateMemberSet | protected void populateMemberSet(Set s, boolean debugger)(Code) | | Derived classes that implement
BuiltinType.getMember should also
implement this.
Parameters: s - the set to populate Parameters: debugger - true if being used by debugger, inwhich case both public and private/protected field names should be returned See Also: BuiltinType.getMember |
populateTypeMemberSet | protected void populateTypeMemberSet(Set s, boolean debugger)(Code) | | Derived classes that implement
BuiltinType.getTypeMember should also
implement this.
Parameters: s - the set to populate Parameters: debugger - true if being used by debugger, inwhich case both public and private/protected field names should be returned See Also: BuiltinType.getTypeMember |
Methods inherited from oscript.data.JavaClassWrapper | Debugger.MemberAccessor _getTypeMemberAccessor(Value obj, Value name)(Code)(Java Doc) public Value callAsConstructor(StackFrame sf, MemberTable args) throws PackagedScriptObjectException(Code)(Java Doc) public Value callAsExtends(StackFrame sf, Scope scope, MemberTable args) throws PackagedScriptObjectException(Code)(Java Doc) public Object castToJavaObject() throws PackagedScriptObjectException(Code)(Java Doc) public String castToString() throws PackagedScriptObjectException(Code)(Java Doc) protected Object doConstruct(StackFrame sf, MemberTable args, boolean isWrapper)(Code)(Java Doc) public static synchronized Class forName(String className) throws ClassNotFoundException(Code)(Java Doc) public ClassLoader getClassLoader()(Code)(Java Doc) public static synchronized JavaClassWrapper getClassWrapper(Class javaClass)(Code)(Java Doc) public static JavaClassWrapper getClassWrapper(String className) throws ClassNotFoundException(Code)(Java Doc) public Value getMember(int id, boolean exception) throws PackagedScriptObjectException(Code)(Java Doc) public String getName()(Code)(Java Doc) protected Value getTypeImpl()(Code)(Java Doc) protected Value getTypeMember(Value obj, int id)(Code)(Java Doc) protected Value getTypeMemberImpl(Object javaObj, int id)(Code)(Java Doc) protected synchronized void init()(Code)(Java Doc) public boolean isA(Value type)(Code)(Java Doc) protected void populateMemberSet(Set s, boolean debugger)(Code)(Java Doc) protected void populateTypeMemberSet(Set s, boolean debugger)(Code)(Java Doc) Object readResolve() throws java.io.ObjectStreamException(Code)(Java Doc) final static Method searchForAccessibleMethod(String name, Class javaClass, Class[] paramTypes)(Code)(Java Doc)
|
Methods inherited from oscript.data.Value | public static Value _getTypeMember(Value type, Value obj, int id)(Code)(Java Doc) public static void _populateTypeMemberSet(Value type, java.util.Set s, boolean d)(Code)(Java Doc) public Value bopBitwiseAnd(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopBitwiseAndR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopBitwiseOr(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopBitwiseOrR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopBitwiseXor(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopBitwiseXorR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopCast(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopCastR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopDivide(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopDivideR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopEquals(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopEqualsR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopGreaterThan(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopGreaterThanOrEquals(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopGreaterThanOrEqualsR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopGreaterThanR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopInstanceOf(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopInstanceOfR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLeftShift(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLeftShiftR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLessThan(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLessThanOrEquals(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLessThanOrEqualsR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLessThanR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLogicalAnd(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLogicalAndR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLogicalOr(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopLogicalOrR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopMinus(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopMinusR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopMultiply(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopMultiplyR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopNotEquals(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopNotEqualsR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopPlus(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopPlusR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopRemainder(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopRemainderR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopSignedRightShift(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopSignedRightShiftR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopUnsignedRightShift(Value val) throws PackagedScriptObjectException(Code)(Java Doc) public Value bopUnsignedRightShiftR(Value val, PackagedScriptObjectException e) throws PackagedScriptObjectException(Code)(Java Doc) public Value callAsConstructor(StackFrame sf, MemberTable args) throws PackagedScriptObjectException(Code)(Java Doc) final public Value callAsConstructor(Value[] args) throws PackagedScriptObjectException(Code)(Java Doc) final public Value callAsConstructor(StackFrame sf, Value[] args)(Code)(Java Doc) public Value callAsExtends(StackFrame sf, Scope scope, MemberTable args) throws PackagedScriptObjectException(Code)(Java Doc) final public Value callAsExtends(Scope scope, MemberTable args) throws PackagedScriptObjectException(Code)(Java Doc) final public Value callAsExtends(StackFrame sf, Scope scope, Value[] args)(Code)(Java Doc) public Value callAsFunction(StackFrame sf, MemberTable args) throws PackagedScriptObjectException(Code)(Java Doc) final public Value callAsFunction(Value[] args) throws PackagedScriptObjectException(Code)(Java Doc) final public Value callAsFunction(StackFrame sf, Value[] args)(Code)(Java Doc) public boolean castToBoolean() throws PackagedScriptObjectException(Code)(Java Doc) public long castToExactNumber() throws PackagedScriptObjectException(Code)(Java Doc) public double castToInexactNumber() throws PackagedScriptObjectException(Code)(Java Doc) public Object castToJavaObject() throws PackagedScriptObjectException(Code)(Java Doc) public String castToString() throws PackagedScriptObjectException(Code)(Java Doc) public Value elementAt(Value idx) throws PackagedScriptObjectException(Code)(Java Doc) public Value elementsAt(Value idx1, Value idx2) throws PackagedScriptObjectException(Code)(Java Doc) final public Value getMember(String name) throws PackagedScriptObjectException(Code)(Java Doc) public Value getMember(Value name) throws PackagedScriptObjectException(Code)(Java Doc) final public Value getMember(int id) throws PackagedScriptObjectException(Code)(Java Doc) final public Value getMember(String name, boolean exception) throws PackagedScriptObjectException(Code)(Java Doc) final public Value getMember(Value name, boolean exception) throws PackagedScriptObjectException(Code)(Java Doc) public Value getMember(int id, boolean exception) throws PackagedScriptObjectException(Code)(Java Doc) public Object getMonitor()(Code)(Java Doc) public Value getType()(Code)(Java Doc) abstract protected Value getTypeImpl()(Code)(Java Doc) protected Value getTypeMember(Value obj, int id)(Code)(Java Doc) final protected Value getTypeMember(Value obj, Value name)(Code)(Java Doc) public boolean isA(Value type)(Code)(Java Doc) public int length() throws PackagedScriptObjectException(Code)(Java Doc) public java.util.Set memberSet()(Code)(Java Doc) protected PackagedScriptObjectException noSuchMember(String member)(Code)(Java Doc) public void opAssign(Value val) throws PackagedScriptObjectException(Code)(Java Doc) protected void populateMemberSet(java.util.Set s, boolean debugger)(Code)(Java Doc) protected void populateTypeMemberSet(java.util.Set s, boolean debugger)(Code)(Java Doc) public void readExternal(java.io.ObjectInput in) throws ClassNotFoundException, java.io.IOException(Code)(Java Doc) public String toString()(Code)(Java Doc) public Value unhand()(Code)(Java Doc) public Value uopBitwiseNot() throws PackagedScriptObjectException(Code)(Java Doc) public Value uopDecrement() throws PackagedScriptObjectException(Code)(Java Doc) public Value uopIncrement() throws PackagedScriptObjectException(Code)(Java Doc) public Value uopLogicalNot() throws PackagedScriptObjectException(Code)(Java Doc) public Value uopMinus() throws PackagedScriptObjectException(Code)(Java Doc) public Value uopPlus() throws PackagedScriptObjectException(Code)(Java Doc) public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException(Code)(Java Doc)
|
|
|