Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.operands;
 
This represents a variable used in a closure that is local to the closure and is not defined in any ancestor lexical scope
public class ClosureLocalVariable extends LocalVariable {
    final public IRClosure definingScope;
    public ClosureLocalVariable(IRClosure scopeString nameint scopeDepthint location) {
        super(namescopeDepthlocation);
        this. = scope;
    }
    @Override
    public String toString() {
        return "<" +  + "(" +  + ":" +  + ")>";
    }
    @Override
    public int hashCode() {
        return .hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof ClosureLocalVariable)) return false;
        return .equals(((LocalVariableobj).);
    }
    public int compareTo(Object arg0) {
        // ENEBO: what should compareTo when it is not comparable?
        if (!(arg0 instanceof ClosureLocalVariable)) return 0;
        return .compareTo(((LocalVariablearg0).);
    }
    @Override
        return new ClosureLocalVariable(ii.getClonedClosure(), );
    }
    // SSS FIXME: Better name than this?
    public LocalVariable cloneForDepth(int n) {
        return new ClosureLocalVariable(n);
    }
    @Override
    public void visit(IRVisitor visitor) {
        visitor.ClosureLocalVariable(this);
    }
New to GrepCode? Check out our FAQ X