Package it.unive.lisa.analysis
Class ScopeToken
- java.lang.Object
-
- it.unive.lisa.analysis.ScopeToken
-
public class ScopeToken extends java.lang.Object
A token that can be used for pushing and popping scopes on local variables throughScopedObject.pushScope(ScopeToken)
andScopedObject.popScope(ScopeToken)
. The token is identified by aCodeElement
.
-
-
Constructor Summary
Constructors Constructor Description ScopeToken(CodeElement scoper)
Builds a new scope, referring to the given code element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
CodeElement
getScoper()
Yields the element that this scope refers to.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ScopeToken
public ScopeToken(CodeElement scoper)
Builds a new scope, referring to the given code element.- Parameters:
scoper
- the code element
-
-
Method Detail
-
getScoper
public CodeElement getScoper()
Yields the element that this scope refers to.- Returns:
- the code element
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-