Class MarshalerLookup

java.lang.Object
org.robovm.rt.bro.MarshalerLookup

public class MarshalerLookup
extends Object
Looks up marshaler methods for converting long handles to objects given a class extending NativeObject.
  • Constructor Details

    • MarshalerLookup

      public MarshalerLookup()
  • Method Details

    • toObject

      public static <S extends NativeObject> S toObject​(Class<S> type, long handle)
      Convenience method which finds a marshaler method and runs it converting the specified handle to the specified type.
      Parameters:
      type - the type to convert to.
      handle - the handle (pointer).
      Returns:
      the marshaled instance.
    • findMarshaler

      public static Method findMarshaler​(Class<? extends NativeObject> type)
      Finds a T toObject(Class<?>, long, long) marshaler method which can convert handles into the specified type.
      Returns:
      the Method