Class LazyGlobalValue<T>

java.lang.Object
org.robovm.rt.bro.GlobalValueSupplier<T>
org.robovm.rt.bro.LazyGlobalValue<T>

public class LazyGlobalValue<T>
extends GlobalValueSupplier<T>
Reads a GlobalValue lazily and optionally caches the result.
  • Constructor Details

    • LazyGlobalValue

      public LazyGlobalValue​(Class<?> owner, String getterName)
      Creates a new constant LazyGlobalValue. The value will only be read once and that value will then always be returned by value().
      Parameters:
      owner - the class where the GlobalValue method is to be found.
      getterName - the name of the GlobalValue getter method.
    • LazyGlobalValue

      public LazyGlobalValue​(Class<?> owner, String getterName, boolean constant)
      Creates a new LazyGlobalValue.
      Parameters:
      owner - the class where the GlobalValue method is to be found.
      getterName - the name of the GlobalValue getter method.
      constant - if true the value will only read once and then cached.
  • Method Details