org.jruby.util
Class TestHelper

java.lang.Object
  extended byorg.jruby.util.TestHelper

public class TestHelper
extends java.lang.Object

Helper class, used for testing calls to java from ruby code.

Version:
$Revision: 1.8 $
Author:
Benoit Cerrina

Nested Class Summary
static interface TestHelper.SomeInterface
           
 
Field Summary
 java.lang.String localVariable1
           
 
Constructor Summary
TestHelper()
           
 
Method Summary
static java.lang.String[] createArray(int i)
          used to test Java Arrays in Ruby.
static TestHelper.SomeInterface getInterfacedInstance()
           
static java.lang.Object getLooslyCastedInstance()
           
static java.lang.Object getNull()
           
static IRubyObject loadAndCall(IRubyObject self, java.lang.String name, byte[] javaClass, java.lang.String methodName)
          Used by JVM bytecode compiler tests to run compiled code
static void throwException()
          used to test native exception handling.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localVariable1

public java.lang.String localVariable1
Constructor Detail

TestHelper

public TestHelper()
Method Detail

createArray

public static java.lang.String[] createArray(int i)
used to test Java Arrays in Ruby. while we don't yet have a way to create them this can be used to test basic array functionalities


throwException

public static void throwException()
used to test native exception handling.


getInterfacedInstance

public static TestHelper.SomeInterface getInterfacedInstance()
Returns:
object used to test casting

getLooslyCastedInstance

public static java.lang.Object getLooslyCastedInstance()

getNull

public static java.lang.Object getNull()

loadAndCall

public static IRubyObject loadAndCall(IRubyObject self,
                                      java.lang.String name,
                                      byte[] javaClass,
                                      java.lang.String methodName)
                               throws java.lang.Throwable
Used by JVM bytecode compiler tests to run compiled code

Throws:
java.lang.Throwable


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.