org.jruby.compiler.ir.operands
Class MetaObject

java.lang.Object
  extended by org.jruby.compiler.ir.operands.Operand
      extended by org.jruby.compiler.ir.operands.MetaObject
Direct Known Subclasses:
ClosureMetaObject, ModuleMetaObject

public class MetaObject
extends Operand


Field Summary
 IRScope scope
           
 
Fields inherited from class org.jruby.compiler.ir.operands.Operand
EMPTY_ARRAY
 
Constructor Summary
protected MetaObject(IRScope scope)
           
 
Method Summary
static MetaObject create(IRScope scope)
           
 Operand getContainer()
           
 RubyModule getContainer(InterpreterContext interp, Ruby runtime)
           
 Operand getNearestClass()
          Find the closest ClassMetaObject that contains this metaobject.
 IRScope getScope()
           
 IRClass getTargetClass()
           
 RubyModule interpretBody(InterpreterContext interp, ThreadContext context, RubyModule module)
           
 boolean isClass()
           
 boolean isClosure()
           
 boolean isConstant()
           
 boolean isModule()
           
 java.lang.String toString()
           
 
Methods inherited from class org.jruby.compiler.ir.operands.Operand
addUsedVariables, cloneForInlining, fetchCompileTimeArrayElement, getSimplifiedOperand, getValue, isNonAtomicValue, retrieve, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scope

public final IRScope scope
Constructor Detail

MetaObject

protected MetaObject(IRScope scope)
Method Detail

create

public static MetaObject create(IRScope scope)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isConstant

public boolean isConstant()
Overrides:
isConstant in class Operand

isClass

public boolean isClass()

isModule

public boolean isModule()

isClosure

public boolean isClosure()

getScope

public IRScope getScope()

getNearestClass

public Operand getNearestClass()
Find the closest ClassMetaObject that contains this metaobject. Note that it may be itself a class and return itself.

Returns:

getContainer

public Operand getContainer()

getTargetClass

public IRClass getTargetClass()
Overrides:
getTargetClass in class Operand

interpretBody

public RubyModule interpretBody(InterpreterContext interp,
                                ThreadContext context,
                                RubyModule module)

getContainer

public RubyModule getContainer(InterpreterContext interp,
                               Ruby runtime)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.