public class VMProxyArg
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
callerReference
the reference we are proxying for
|
private boolean |
constant
by default, we are dynamic.
|
private java.lang.String |
contextReference
our identity in the current context
|
private int |
GENERALSTATIC
in the event our type is switched - we don't care really what it is
|
private SimpleNode |
nodeTree
the AST if the type is such that it's dynamic (ex.
|
private int |
numTreeChildren
number of children in our tree if a reference
|
private RuntimeServices |
rsvc |
private java.lang.String |
singleLevelRef
the 'de-dollared' reference if we are a ref but don't have a method attached
|
private java.lang.Object |
staticObject
reference for the object if we proxy for a static arg like an NumberLiteral
|
private int |
type
type of arg I will have
|
private InternalContextAdapter |
usercontext
not used in this impl : carries the appropriate user context
|
Constructor and Description |
---|
VMProxyArg(RuntimeServices rs,
java.lang.String contextRef,
java.lang.String callerRef,
int t)
ctor for current impl
takes the reference literal we are proxying for, the literal
the VM we are for is called with...
|
VMProxyArg(VMProxyArg model,
InternalContextAdapter c)
not used in current impl
Constructor for alternate impl where VelProxy class would make new
VMProxyArg objects, and use this contructor to avoid reparsing the
reference args
that impl also had the VMProxyArg carry it's context
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallerReference() |
java.lang.String |
getContextReference() |
SimpleNode |
getNodeTree() |
java.lang.Object |
getObject(InternalContextAdapter context)
returns the value of the reference.
|
java.lang.Object |
getStaticObject() |
int |
getType() |
boolean |
isConstant()
tells if arg we are poxying for is
dynamic or constant.
|
java.lang.Object |
setObject(InternalContextAdapter context,
java.lang.Object o)
Invoked by VMContext when Context.put() is called for a proxied reference.
|
private void |
setup()
does the housekeeping upon creationg.
|
private int type
private SimpleNode nodeTree
private java.lang.Object staticObject
private InternalContextAdapter usercontext
private int numTreeChildren
private java.lang.String contextReference
private java.lang.String callerReference
private java.lang.String singleLevelRef
private boolean constant
private final int GENERALSTATIC
private RuntimeServices rsvc
public VMProxyArg(RuntimeServices rs, java.lang.String contextRef, java.lang.String callerRef, int t)
contextRef
- reference arg in the definition of the VM, used in the VMcallerRef
- reference used by the caller as an arg to the VMt
- type of arg : JJTREFERENCE, JJTTRUE, etcpublic VMProxyArg(VMProxyArg model, InternalContextAdapter c)
public boolean isConstant()
public java.lang.Object setObject(InternalContextAdapter context, java.lang.Object o)
context
- context to modify via direct placement, or AST.setValue()o
- new value of referencepublic java.lang.Object getObject(InternalContextAdapter context)
context
- Context to use for getting current valueprivate void setup()
public java.lang.String getCallerReference()
public java.lang.String getContextReference()
public SimpleNode getNodeTree()
public java.lang.Object getStaticObject()
public int getType()
Copyright ? 2002 Apache Software Foundation. All Rights Reserved.