public class Context
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
Context.LocalVariable |
| Modifier and Type | Field and Description |
|---|---|
int |
id |
com.github.kayjamlang.core.containers.Container |
parent |
Context |
parentContext |
boolean |
useParentVars |
java.util.Map<java.lang.String,Context.LocalVariable> |
variables |
| Constructor and Description |
|---|
Context(com.github.kayjamlang.core.containers.Container parent,
Context parentContext) |
Context(com.github.kayjamlang.core.containers.Container parent,
Context parentContext,
boolean useParentVars) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVariable(java.lang.String name,
java.lang.Object value) |
void |
clearVariables() |
java.lang.Object |
clone() |
com.github.kayjamlang.core.containers.FunctionContainer |
findFunction(MainContext context,
com.github.kayjamlang.core.expressions.Expression expression,
java.lang.String name,
java.util.List<com.github.kayjamlang.core.Type> args) |
<T> T |
getVariable(java.lang.String name) |
boolean |
setVariable(java.lang.String name,
com.github.kayjamlang.core.Type type,
java.lang.Object value) |
public final int id
public final com.github.kayjamlang.core.containers.Container parent
public final Context parentContext
public final boolean useParentVars
public final java.util.Map<java.lang.String,Context.LocalVariable> variables
public Context(com.github.kayjamlang.core.containers.Container parent,
Context parentContext,
boolean useParentVars)
public Context(com.github.kayjamlang.core.containers.Container parent,
Context parentContext)
public void clearVariables()
public com.github.kayjamlang.core.containers.FunctionContainer findFunction(MainContext context, com.github.kayjamlang.core.expressions.Expression expression, java.lang.String name, java.util.List<com.github.kayjamlang.core.Type> args) throws KayJamNotFoundException
KayJamNotFoundExceptionpublic void addVariable(java.lang.String name,
java.lang.Object value)
public <T> T getVariable(java.lang.String name)
public boolean setVariable(java.lang.String name,
com.github.kayjamlang.core.Type type,
java.lang.Object value)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException