Top Description Fields Constructors Methods
org.jruby.embed.internal

public Class EmbedRubyInterfaceAdapterImpl

extends Object
implements EmbedRubyInterfaceAdapter
Class Inheritance
All Implemented Interfaces
org.jruby.embed.EmbedRubyInterfaceAdapter
Imports
org.jruby.Ruby, .RubyNil, org.jruby.embed.EmbedRubyInterfaceAdapter, .ScriptingContainer, org.jruby.javasupport.JavaEmbedUtils, .JavaUtil, org.jruby.runtime.builtin.IRubyObject

The implementation of EmbedRubyInterfaceAdapter and implements the method that gets a instance of requested interface, which is implemented in Ruby.
Author
Yoko Harada <[email protected]>

Field Summary

Modifier and TypeField and Description
private final ScriptingContainer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T> T

Returns:

an instance of requested interface type.
getInstance
(Object
a receiver of the previously evaluated script.
receiver
,
Class<T>
an interface type of the returning instance.
clazz
)

Implements org.jruby.embed.EmbedRubyInterfaceAdapter.getInstance.

Returns a instance of a requested interface type from a previously evaluated script.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containerback to summary
private final ScriptingContainer container

Constructor Detail

EmbedRubyInterfaceAdapterImplback to summary
public EmbedRubyInterfaceAdapterImpl(ScriptingContainer container)

Method Detail

getInstanceback to summary
public <T> T getInstance(Object receiver, Class<T> clazz)

Implements org.jruby.embed.EmbedRubyInterfaceAdapter.getInstance.

Returns a instance of a requested interface type from a previously evaluated script.

Parameters
receiver:Object

a receiver of the previously evaluated script.

clazz:Class<T>

an interface type of the returning instance.

Returns:T

an instance of requested interface type.