Package ca.ubc.stat.blang.jvmmodel
Class BlangScope
java.lang.Object
ca.ubc.stat.blang.jvmmodel.BlangScope
@Data
public class BlangScope
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlangScope.BlangVariable
These can be either param (boxed) or random (no boxing) When there is no boxing, deboxed and boxed version are equal, otherwise they differ. -
Constructor Summary
Constructors Constructor Description BlangScope(BlangScope parent, java.util.LinkedHashMap<java.lang.String,BlangScope.BlangVariable> topVariables)
-
Method Summary
Modifier and Type Method Description BlangScope
child(BlangScope.BlangVariable variable)
Return a new scope containing this (via a pointer) + a single additional variable.static BlangScope
emptyScope()
Create an empty scope.boolean
equals(java.lang.Object obj)
BlangScope.BlangVariable
find(java.lang.String deboxedName)
Return the variable with the given deboxed name or null otherwise.BlangScope
getParent()
java.util.LinkedHashMap<java.lang.String,BlangScope.BlangVariable>
getTopVariables()
int
hashCode()
BlangScope.BlangVariable
operator_add(BlangScope.BlangVariable newVariable)
BlangScope
restrict(java.util.List<Dependency> dependencies)
java.lang.String
toString()
java.lang.Iterable<BlangScope.BlangVariable>
variables()
Returns the variables in this scopeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
BlangScope
public BlangScope(BlangScope parent, java.util.LinkedHashMap<java.lang.String,BlangScope.BlangVariable> topVariables)
-
-
Method Details
-
emptyScope
Create an empty scope. -
operator_add
-
child
Return a new scope containing this (via a pointer) + a single additional variable. -
find
Return the variable with the given deboxed name or null otherwise. -
variables
Returns the variables in this scope -
restrict
-
hashCode
@Pure public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
@Pure public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
toString
@Pure public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getParent
-
getTopVariables
-