Class FFMConfig

java.lang.Object
org.lwjgl.system.ffm.FFMConfig

public final class FFMConfig extends Object
Binding configuration, used to customize the generation of binding implementations.

It also acts as a registry for Binder instances.

  • Method Details

    • getLookup

      public MethodHandles.Lookup getLookup()
      Returns the MethodHandles.Lookup associated with this configuration.
      Returns:
      the lookup instance
    • hasBinder

      public boolean hasBinder(Class<?> type)
      Returns true if a Binder has been registered for the specified type.
      Parameters:
      type - an upcall, struct or union interface
      Returns:
      true if such a Binder has been registered
    • getStructBinder

      public <T> StructBinder<T> getStructBinder(Class<T> type)
      Returns the StructBinder registered for the specified struct interface.
      Parameters:
      type - a struct interface
      Returns:
      the registered StructBinder
      Throws:
      NullPointerException - if no StructBinder is registered for the specified type
    • getUnionBinder

      public <T> UnionBinder<T> getUnionBinder(Class<T> type)
      Returns the UnionBinder registered for the specified union interface.
      Parameters:
      type - a union interface
      Returns:
      the registered UnionBinder
      Throws:
      NullPointerException - if no UnionBinder is registered for the specified type
    • getUpcallBinder

      public <T> UpcallBinder<T> getUpcallBinder(Class<T> type)
      Returns the UpcallBinder registered for the specified upcall interface.
      Parameters:
      type - an upcall interface
      Returns:
      the registered UpcallBinder
      Throws:
      NullPointerException - if no UpcallBinder is registered for the specified type
    • getNullableAnnotation

      public @Nullable Class<? extends Annotation> getNullableAnnotation()
      Returns the nullable annotation class associated with this configuration.
      Returns:
      the nullable annotation class, or null if none is set
    • getSymbolLookup

      public @Nullable SymbolLookup getSymbolLookup()
      Returns the SymbolLookup associated with this configuration.
      Returns:
      the symbol lookup, or null if none is set
    • getTraceConsumer

      public @Nullable TraceConsumer getTraceConsumer()
      Returns the TraceConsumer associated with this configuration.
      Returns:
      the trace consumer, or null if none is set
    • getTracingFilter

      public @Nullable Predicate<Method> getTracingFilter()
      Returns the tracing filter Predicate associated with this configuration.
      Returns:
      the trace filter, or null if none is set
    • getCriticalOverride

      public @Nullable Function<Method,Boolean> getCriticalOverride()
      Returns the critical override Function associated with this configuration.
      Returns:
      the critical override function, or null if none is set
    • checks

      public boolean checks()
      Returns whether runtime checks are enabled.
      Returns:
      true if runtime checks are enabled
    • debugGenerator

      public boolean debugGenerator()
      Returns whether generator debug output is enabled.
      Returns:
      true if generator debug output is enabled