Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ReflectionUtils

[17:14] static extends: object

Helper for FXGL's ReflectionUtils (com.almasb.fxgl.core.reflect.ReflectionUtils). Static reflection helpers used internally by the engine. Most methods take a Class<? extends Annotation> at the JVM signature, which Aussom cannot synthesize at runtime, so this wrapper exposes only the methods reachable from Aussom-side code: Method lookup, Method invocation (call / callInaccessible), instance construction by Class, and the root-cause exception walker.

Methods

  • getMethod (string ClassName, string MethodName, list ParamClassNamesList)

    Returns the Method handle for the named method on the supplied Class with the supplied parameter Class array.

    • @p ClassName is the fully qualified class name.
    • @p MethodName is the method name.
    • @p ParamClassNamesList is an Aussom list of parameter class names (each a string FQN).
    • @r A java.lang.reflect.Method AJO.
  • call (object InstanceObj, object MethodAjo, list Args)

    Invokes MethodAjo against InstanceObj with the supplied argument AJOs.

    • @p InstanceObj is the receiver (Aussom wrapper or raw AJO).
    • @p MethodAjo is a java.lang.reflect.Method AJO.
    • @p Args is an Aussom list of argument AJOs.
  • callInaccessible (object InstanceObj, object MethodAjo, list Args)

    Invokes MethodAjo even when the underlying method is private / protected — calls setAccessible(true) first.

  • newInstance (string ClassName)

    Returns a fresh instance of the named class via the no-arg constructor. Throws when the class lacks a no-arg ctor.

    • @p ClassName is the fully qualified class name.
  • getRootCause (object ThrowableAjo)

    Walks the cause chain of ThrowableAjo and returns the root Throwable (the bottom of the chain).

    • @p ThrowableAjo is a java.lang.Throwable AJO.