|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.itim.script.ContextItem
public abstract class ContextItem
Wrapper class that holds all the information about an object that is needed to load the object into a scripting framework.
Method Summary | |
---|---|
static ContextItem |
createConstructor(java.lang.String name,
java.lang.Class prototype)
Get a ContextItem that represents a constructor in the scripting environment. |
static ContextItem |
createGlobalFunction(java.lang.String name,
GlobalFunction function)
Get a ContextItem that represents a global function in the scripting environment. |
static ContextItem |
createItem(java.lang.String name)
Get a ContextItem object with the given name. |
static ContextItem |
createItem(java.lang.String name,
java.lang.Object contextItem)
Get a ContextItem object with the given name and set to contextItem. |
java.lang.Object |
getContextObject()
Get a reference to the contextObject. |
java.lang.String |
getName()
Get the name of the ContextItem. |
java.lang.String |
getType()
Get the type of the contextObject in the ContextItem. |
abstract void |
setContextObject(java.lang.Object obj)
Sets the context object (the object to put into the scripting environment) to obj. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ContextItem createItem(java.lang.String name)
name
- The name for the new ContextItem. The name cannot be changed
later.
public static ContextItem createItem(java.lang.String name, java.lang.Object contextItem)
name
- The name for the new ContextTime. The name cannot be changed
later.contextItem
- The item to set contextObject to.
public static ContextItem createConstructor(java.lang.String name, java.lang.Class prototype)
name
- The name for the new ContextItem.prototype
- The class that acts a prototype for creating new Objects of
the same type. prototype must have a default constructor.
public static ContextItem createGlobalFunction(java.lang.String name, GlobalFunction function)
increment();
name
- The name of the new ContextItem.function
- The GlobalFunction object on which to call call()
whenever a script calls the function.
public java.lang.Object getContextObject()
public abstract void setContextObject(java.lang.Object obj)
obj
- The Object to use as the context object.public java.lang.String getName()
public java.lang.String getType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |