# RHJavaObject

Inherits from: RHObject


# Class Methods

# Inherited methods

Destructor ErrorAssoc OKAssoc

# InvokeStatic

function Dynamic InvokeStatic(String className, String methodName, List args={})

# InvokeStaticTry

function Assoc InvokeStaticTry(String className, String methodName, List args={})

# New

function Frame New(Dynamic className=.kJavaClass, Dynamic args={})

This universal constructor can be called for any JavaClass via:

Frame s = $RHCore.RHJavaObject.New("java.lang.String", "Hello")

or

Frame s = $RHCore.RHJavaObject.New(<JavaObject>)

The constructor will go to the RHJavaObjectSubsystem to see if an appropriate wrapper class can be found and will use it if possible.

# Overrides:

New in class RHObject

# Instance Methods

# Property Methods

Property methods can be accessed with the valueForKey method.

classidentifier classname clone errorassoc getclassname hash identityhashcode iterator methods okassoc propertymethods reset serialize string tostring unwrap

# Inherited methods

assert cacheMethod cacheValueForKey callSuper class classIdentifier className clone deserialize dict endTrans hash identityHashCode isAccessorMethod isCached isInstanceOf isProperty isPropertyMethod methods pluck prepareForReuse propertyMethods removeFromCache reset resetCache respondsTo serialize setCacheValueForKey setValueForKey setValueForKeyPath startTrans super valueForKey valueForKeyPath

# checkError

function Assoc checkError(Dynamic status, String errMsg=JavaObject.GetError())

This function attempts to harmonize various return values into a consistent return value Assoc.

# Overrides:

checkError in class RHObject

# Parameters
  • status - The value to check (e.g., Error, Integer, Assoc, etc.)

  • errMsg - (Optional) An error string.

# Returns
  • A return value Assoc.

# getClassName

function String getClassName()

# invoke

function Dynamic invoke(String methodName, List args={}, Boolean wrapInRHJavaObject=true)

# invokeTry

function Dynamic invokeTry(String methodName, List args={}, Boolean permitNull=true)

# iterator

function Frame iterator()

For JavaObjects that represent an array[], this will turn it into a standard RHCore iterator.

# Overrides:

iterator in class RHObject

# resetSubclass

function Void resetSubclass()

# Overrides:

resetSubclass in class RHObject

# setValues

function Frame setValues(JavaObject jObject)

# Overrides:

setValues in class RHObject

# string

function String string()

This method returns a string representation of the object.

# Overrides:

string in class RHObject

# toString

function String toString()

# unwrap

function JavaObject unwrap()

Last Updated: 3/28/2019, 2:48:37 PM