Class Access

java.lang.Object
net.ME1312.Galaxi.Library.Access

public class Access extends Object
MethodHandle Access Class
This class provides a simpler interface for working with Java's MethodHandle API.
This is not a replacement for reflection as that's still faster for single requests. Cache these objects when making repeated or frequent requests.
See Also:
  • Field Details

    • shared

      public static final Access shared
      Access a resource that has been shared to all modules; a public resource
    • unnamed

      public static final Access unnamed
      Access a resource from the unnamed module; the same module as Galaxi
      This short-hand will be removed the moment multi-module JPMS jarfiles become available to us
  • Method Details

    • module

      public static Access module(MethodHandles.Lookup module)
      Access a resource from a module that opens to you
      Parameters:
      module - Module Lookup
      Returns:
      Module Accessor
    • type

      public Access.Class type(Class<?> clazz)
      Access a Class
      Parameters:
      clazz - Class
      Returns:
      Class Accessor