|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectkoala.dynamicjava.interpreter.context.VariableContext
koala.dynamicjava.interpreter.context.GlobalContext
koala.dynamicjava.interpreter.context.StaticContext
koala.dynamicjava.interpreter.context.MethodContext
A method method context.
| Nested Class Summary |
| Nested classes inherited from class koala.dynamicjava.interpreter.context.GlobalContext |
GlobalContext.PseudoClassLoader, GlobalContext.PseudoError |
| Nested classes inherited from class koala.dynamicjava.interpreter.context.VariableContext |
VariableContext.AbstractVariable, VariableContext.Constant, VariableContext.Link, VariableContext.LinkFactory, VariableContext.Scope, VariableContext.Variable |
| Field Summary | |
protected static Identifier |
thisIdentifier
The "this" identifier |
| Fields inherited from class koala.dynamicjava.interpreter.context.StaticContext |
declaringClass, defaultQualifier |
| Fields inherited from class koala.dynamicjava.interpreter.context.GlobalContext |
accessible, CLASS_TYPE, classCount, classLoader, clc, functions, importationManager, interpreter, LOCALS, LOCALS_NAME, MAP_TYPE, OBJECT_ARRAY_ARRAY, OBJECT_CLASS, OBJECT_TYPE |
| Fields inherited from class koala.dynamicjava.interpreter.context.VariableContext |
cscope, scope, scopes |
| Constructor Summary | |
MethodContext(Interpreter i,
java.lang.Class c,
java.lang.Object obj,
ImportationManager im)
Creates a new context |
|
MethodContext(Interpreter i,
java.lang.Class c,
java.lang.Object obj,
java.util.Set fp)
Creates a new context |
|
| Method Summary | |
Expression |
createName(Node node,
IdentifierToken name)
Creates the tree that is associated with the given name |
Node |
getDefaultQualifier(Node node,
java.lang.String tname)
Returns the default qualifier for this context |
java.lang.Object |
getHiddenArgument()
Returns the default argument to pass to methods in this context |
protected java.lang.String |
getOuterThisName(java.lang.Class c)
Finds the name of the reference to an outerclass in the given class |
java.lang.Object |
invokeConstructor(ClassAllocation node,
java.lang.Object[] args)
Invokes a constructor |
java.lang.Object |
invokeConstructor(SimpleAllocation node,
java.lang.Object[] args)
Invokes a constructor |
protected boolean |
isInnerclass(java.lang.Class ic,
java.lang.Class oc)
Tests whether an class is an inner class of another |
java.lang.reflect.Method |
lookupMethod(Node prefix,
java.lang.String mname,
java.lang.Class[] params)
Looks for a method |
java.lang.Class |
setProperties(ClassAllocation node,
java.lang.Class c,
java.lang.Class[] args,
java.util.List memb)
Sets the properties of a ClassAllocation node |
java.lang.Class |
setProperties(SimpleAllocation node,
java.lang.Class c,
java.lang.Class[] cargs)
Sets the properties of a SimpleAllocation node |
| Methods inherited from class koala.dynamicjava.interpreter.context.StaticContext |
classExists, defineClass, defineFunction, fieldExists, getDefaultQualifier, getField, getModifier, getSuperField, isDefined, isInnerClass, lookupClass, lookupSuperMethod, setAccessFlag |
| Methods inherited from class koala.dynamicjava.interpreter.context.GlobalContext |
createClassArrayInitializer, declareClassImport, declarePackageImport, exists, getAccessible, getAdditionalClassLoader, getCurrentPackage, getFunctions, getImportationManager, getInterpreter, getModifier, getModifier, getModifier, getPackageName, lookupClass, lookupConstructor, lookupFunction, setAccessible, setAdditionalClassLoaderContainer, setCurrentPackage, setFunctions, setImportationManager |
| Methods inherited from class koala.dynamicjava.interpreter.context.VariableContext |
define, defineConstant, defineVariables, enterScope, enterScope, get, getConstants, getCurrentScopeVariableNames, getCurrentScopeVariables, isDefinedVariable, isFinal, leaveScope, set, setConstant, setVariable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface koala.dynamicjava.interpreter.context.SimpleContext |
define, defineConstant, defineVariables, enterScope, enterScope, get, getConstants, getCurrentScopeVariableNames, getCurrentScopeVariables, isDefinedVariable, isFinal, leaveScope, set, setConstant, setVariable |
| Field Detail |
protected static final Identifier thisIdentifier
| Constructor Detail |
public MethodContext(Interpreter i,
java.lang.Class c,
java.lang.Object obj,
ImportationManager im)
i - the interpreterc - the declaring class of the methodobj - the current objectim - the importation manager
public MethodContext(Interpreter i,
java.lang.Class c,
java.lang.Object obj,
java.util.Set fp)
i - the interpreterc - the declaring class of the methodobj - the current objectfp - the formal parameters| Method Detail |
public Node getDefaultQualifier(Node node,
java.lang.String tname)
getDefaultQualifier in interface ContextgetDefaultQualifier in class GlobalContextnode - the current nodetname - the qualifier of 'this'
public Expression createName(Node node,
IdentifierToken name)
createName in interface ContextcreateName in class StaticContextnode - the current nodename - the variable name
java.lang.IllegalStateException - if the variable is not definedpublic java.lang.Object getHiddenArgument()
getHiddenArgument in interface ContextgetHiddenArgument in class GlobalContext
public java.lang.Class setProperties(SimpleAllocation node,
java.lang.Class c,
java.lang.Class[] cargs)
setProperties in interface ContextsetProperties in class GlobalContextnode - the allocation nodec - the class of the constructorcargs - the classes of the arguments of the constructor
public java.lang.Object invokeConstructor(SimpleAllocation node,
java.lang.Object[] args)
invokeConstructor in interface ContextinvokeConstructor in class GlobalContextnode - the SimpleAllocation nodeargs - the arguments
public java.lang.Class setProperties(ClassAllocation node,
java.lang.Class c,
java.lang.Class[] args,
java.util.List memb)
setProperties in interface ContextsetProperties in class StaticContextnode - the allocation nodec - the class of the constructorargs - the classes of the arguments of the constructormemb - the class members
public java.lang.Object invokeConstructor(ClassAllocation node,
java.lang.Object[] args)
invokeConstructor in interface ContextinvokeConstructor in class GlobalContextnode - the ClassAllocation nodeargs - the arguments
public java.lang.reflect.Method lookupMethod(Node prefix,
java.lang.String mname,
java.lang.Class[] params)
throws java.lang.NoSuchMethodException
lookupMethod in interface ContextlookupMethod in class StaticContextprefix - the method prefixmname - the method nameparams - the parameter types
java.lang.NoSuchMethodException - if the method cannot be found
protected boolean isInnerclass(java.lang.Class ic,
java.lang.Class oc)
ic - the possibly inner classoc - the possibly outer classprotected java.lang.String getOuterThisName(java.lang.Class c)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||