Example #1
0
  public static Object[] toObjectArray(Varargs luaArgs, int luaStartIndex) {
    // Don't check upper bound -- otherwise varargs after an optional arg are annoying to use
    Checks.checkRange(luaStartIndex, "luaStartIndex", 1);

    Object[] result = new Object[luaArgs.narg() + 1 - luaStartIndex];
    for (int n = 0; n < result.length; n++) {
      result[n] = CoerceLuaToJava.coerceArg(luaArgs.arg(luaStartIndex + n), Object.class);
    }
    return result;
  }
Example #2
0
 public ResourceLoader(MediaType mediaType, IResourceLoadLog resourceLoadLog) {
   this.mediaType = Checks.checkNotNull(mediaType);
   this.resourceLoadLog = Checks.checkNotNull(resourceLoadLog);
   this.checkedFilenames = new LruSet<String>(128);
 }
Example #3
0
  public Button(IScriptEventDispatcher eventDispatcher) {
    this.eventDispatcher = Checks.checkNotNull(eventDispatcher);

    initTransients();
  }