org.jruby.test
Class TestHelper

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

public class TestHelper
extends java.lang.Object

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


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 java.lang.String getClassName(java.lang.Class klass)
           
static TestHelper.SomeInterface getInterfacedInstance()
           
static java.lang.Object getLooslyCastedInstance()
           
static java.lang.Object getNull()
           
 java.lang.String identityTest()
           
static java.lang.Class loadAlternateClass()
           
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 removeWarningsFromEclipse()
           
static void throwException()
          used to test native exception handling.
static void throwTestHelperException()
           
 
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

removeWarningsFromEclipse

public static void removeWarningsFromEclipse()

identityTest

public java.lang.String identityTest()

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()

loadAlternateClass

public static java.lang.Class loadAlternateClass()
                                          throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

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

getClassName

public static java.lang.String getClassName(java.lang.Class klass)

throwTestHelperException

public static void throwTestHelperException()


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