org.jruby.embed.internal
Class EmbedRubyInterfaceAdapterImpl

java.lang.Object
  extended by org.jruby.embed.internal.EmbedRubyInterfaceAdapterImpl
All Implemented Interfaces:
EmbedRubyInterfaceAdapter

public class EmbedRubyInterfaceAdapterImpl
extends java.lang.Object
implements EmbedRubyInterfaceAdapter

The implementation of EmbedRubyInterfaceAdapter and implements the method that gets a instance of requested interface, which is implemented in Ruby.

Author:
Yoko Harada

Constructor Summary
EmbedRubyInterfaceAdapterImpl(ScriptingContainer container)
           
 
Method Summary
<T> T
getInstance(java.lang.Object receiver, java.lang.Class<T> clazz)
          Returns a instance of a requested interface type from a previously evaluated script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbedRubyInterfaceAdapterImpl

public EmbedRubyInterfaceAdapterImpl(ScriptingContainer container)
Method Detail

getInstance

public <T> T getInstance(java.lang.Object receiver,
                         java.lang.Class<T> clazz)
Returns a instance of a requested interface type from a previously evaluated script.

Specified by:
getInstance in interface EmbedRubyInterfaceAdapter
Parameters:
receiver - a receiver of the previously evaluated script.
clazz - an interface type of the returning instance.
Returns:
an instance of requested interface type.


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