org.concord.flash.player
Class FScriptObject
java.lang.Object
|
+--org.concord.flash.player.FScriptObject
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- FArray, FArray, FComponent, FFunction, FImage, FMath, FUndefined
- public class FScriptObject
- extends java.lang.Object
- implements java.lang.Cloneable
Root class for all the objects used in this Flash player.
Method Summary |
java.lang.Object |
callMethod(java.lang.String methodName,
java.lang.Object[] args)
Calls a method on this object. |
java.lang.Object |
clone()
|
java.util.Enumeration |
getAllMembers()
Gets the enumeration of all the members (e.g. |
java.lang.Object |
getMember(java.lang.String field)
Gets the value of a member field. |
java.lang.String |
getName()
|
java.lang.String |
getObjectType()
|
FScriptObject |
getParent()
Retrieves the parent of this object, as specified in the constructor. |
void |
removeMember(java.lang.String member)
Removes a member field |
void |
setMember(java.lang.String field,
java.lang.Object value)
Sets a member field. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
parent
protected FScriptObject parent
members
protected java.util.Hashtable members
FScriptObject
public FScriptObject(java.lang.String name,
FScriptObject parent)
FScriptObject
public FScriptObject()
getName
public java.lang.String getName()
getParent
public FScriptObject getParent()
- Retrieves the parent of this object, as specified in the constructor.
- Returns:
- The parent of this object, null if this object has no parent.
removeMember
public void removeMember(java.lang.String member)
- Removes a member field
- Parameters:
member
- Name of the member field.
setMember
public void setMember(java.lang.String field,
java.lang.Object value)
- Sets a member field.
It does the following (XXXXX means field name)
1) Tries to call setXXXXX on this object
2) If that fails, then sets the member on member hashtable
- Parameters:
field
- The member field namevalue
- The value to set the member field to.
getMember
public java.lang.Object getMember(java.lang.String field)
- Gets the value of a member field.
It tries the following things (XXXXX being field name)
1) Tries to see if the field exists and returns it if it does
2) Tries to call getXXXXX and returns the result if it succeeds
3) gets it from the member hashtable
- Parameters:
field
- Member field name- Returns:
- The value of the member field.
getAllMembers
public java.util.Enumeration getAllMembers()
- Gets the enumeration of all the members (e.g. the member hashtable)
callMethod
public java.lang.Object callMethod(java.lang.String methodName,
java.lang.Object[] args)
- Calls a method on this object. It first checks to see if the method
has been defined by the user, if not, then use reflection to
call the Java method.
- Parameters:
methodName
- the name of the method to callargs
- The arguments to call the method with.
getObjectType
public java.lang.String getObjectType()
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object