Class EmbedRubyInterfaceAdapterImpl

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

public class EmbedRubyInterfaceAdapterImpl extends 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 <[email protected]>
  • Constructor Details

    • EmbedRubyInterfaceAdapterImpl

      public EmbedRubyInterfaceAdapterImpl(ScriptingContainer container)
  • Method Details

    • getInstance

      public <T> T getInstance(Object receiver, 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.