Top Description Methods
org.jruby.compiler

public Interface Compilable<T>

Known Direct Implementers
org.jruby.internal.runtime.methods.CompiledIRMethod, org.jruby.internal.runtime.methods.InterpretedIRMethod, org.jruby.internal.runtime.methods.MixedModeIRMethod, org.jruby.runtime.InterpretedIRBlockBody, org.jruby.runtime.MixedModeIRBlockBody
Type Parameters
<T>
result value to compile
Imports
org.jruby.MetaClass, .RubyBasicObject, .RubyClass, .RubyModule, org.jruby.ir.IRScope, org.jruby.ir.interpreter.InterpreterContext, org.jruby.runtime.ThreadContext

Blocks and methods both share same full build mechanism so they implement this to be buildable.

Method Summary

Modifier and TypeMethod and Description
public default void
completeBuild(T buildResult)
Deprecated since 10.0.

public default void
completeBuild(ThreadContext context, T buildResult)

public InterpreterContext
public default boolean

Returns:

true if the forced build completed; false otherwise
forceBuild
(ThreadContext
the current thread context
context
)

Force this Compilable to finish its build process.

public default String
getClassName(ThreadContext context)
Deprecated

public String

Returns:

method/block source file
getFile
()

public RubyModule
public IRScope
public int

Returns:

method/block source file line
getLine
()

public String

Returns:

method/closure identifier
getName
()

public default String

Returns:

method/block owner's name
getOwnerName
()
Deprecated since 10.0.

Return the owning module/class name.

public default String
public default boolean

Returns:

true if the build has completed; false otherwise.
isBuildComplete
()

Indicates whether this Compilable has completed its build process.

public static String

Returns:

class/module name e.g. Foo::Bar::Baz
resolveFullName
(ThreadContext context, RubyModule implementationClass)

Resolve the fully qualified name.

public void
setCallCount(int count)

Method Detail

completeBuildback to summary
public default void completeBuild(T buildResult)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
completeBuildback to summary
public default void completeBuild(ThreadContext context, T buildResult)
ensureInstrsReadyback to summary
public InterpreterContext ensureInstrsReady()
forceBuildback to summary
public default boolean forceBuild(ThreadContext context)

Force this Compilable to finish its build process. Override this and isBuildComplete() for implementations that have a build process.

Parameters
context:ThreadContext

the current thread context

Returns:boolean

true if the forced build completed; false otherwise

getClassNameback to summary
public default String getClassName(ThreadContext context)

Deprecated

Annotations
@Deprecated
getFileback to summary
public String getFile()
Returns:String

method/block source file

getImplementationClassback to summary
public RubyModule getImplementationClass()
getIRScopeback to summary
public IRScope getIRScope()
getLineback to summary
public int getLine()
Returns:int

method/block source file line

getNameback to summary
public String getName()
Returns:String

method/closure identifier

getOwnerNameback to summary
public default String getOwnerName()

Deprecated

since 10.0.

Return the owning module/class name.

Returns:String

method/block owner's name

Annotations
@Deprecated
since:10.0
getOwnerNameback to summary
public default String getOwnerName(ThreadContext context)
isBuildCompleteback to summary
public default boolean isBuildComplete()

Indicates whether this Compilable has completed its build process. Override this and forceBuild(ThreadContext) for implementations that have a build process.

Returns:boolean

true if the build has completed; false otherwise.

resolveFullNameback to summary
public static String resolveFullName(ThreadContext context, RubyModule implementationClass)

Resolve the fully qualified name.

Returns:String

class/module name e.g. Foo::Bar::Baz

setCallCountback to summary
public void setCallCount(int count)