@Data
public class BlangScope
extends java.lang.Object
Modifier and Type | Class and 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 and Description |
---|
BlangScope(BlangScope parent,
java.util.LinkedHashMap<java.lang.String,BlangScope.BlangVariable> topVariables) |
Modifier and Type | Method and 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 scope
|
public BlangScope(BlangScope parent, java.util.LinkedHashMap<java.lang.String,BlangScope.BlangVariable> topVariables)
public static BlangScope emptyScope()
public BlangScope.BlangVariable operator_add(BlangScope.BlangVariable newVariable)
public BlangScope child(BlangScope.BlangVariable variable)
public BlangScope.BlangVariable find(java.lang.String deboxedName)
public java.lang.Iterable<BlangScope.BlangVariable> variables()
public BlangScope restrict(java.util.List<Dependency> dependencies)
@Pure public int hashCode()
hashCode
in class java.lang.Object
@Pure public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
@Pure public java.lang.String toString()
toString
in class java.lang.Object
@Pure public BlangScope getParent()
@Pure public java.util.LinkedHashMap<java.lang.String,BlangScope.BlangVariable> getTopVariables()