All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.apphosting.runtime.AutoBuilder_ThreadGroupPool_Builder Maven / Gradle / Ivy

There is a newer version: 2.0.31
Show newest version
package com.google.apphosting.runtime;

import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoBuilderProcessor")
class AutoBuilder_ThreadGroupPool_Builder extends ThreadGroupPool.Builder {

  private ThreadGroup parentThreadGroup;

  private String threadGroupNamePrefix;

  private Thread.UncaughtExceptionHandler uncaughtExceptionHandler;

  private boolean ignoreDaemonThreads;

  private byte set$0;

  AutoBuilder_ThreadGroupPool_Builder() {
  }

  @Override
  public ThreadGroupPool.Builder setParentThreadGroup(ThreadGroup parentThreadGroup) {
    if (parentThreadGroup == null) {
      throw new NullPointerException("Null parentThreadGroup");
    }
    this.parentThreadGroup = parentThreadGroup;
    return this;
  }

  @Override
  public ThreadGroupPool.Builder setThreadGroupNamePrefix(String threadGroupNamePrefix) {
    if (threadGroupNamePrefix == null) {
      throw new NullPointerException("Null threadGroupNamePrefix");
    }
    this.threadGroupNamePrefix = threadGroupNamePrefix;
    return this;
  }

  @Override
  public ThreadGroupPool.Builder setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler uncaughtExceptionHandler) {
    if (uncaughtExceptionHandler == null) {
      throw new NullPointerException("Null uncaughtExceptionHandler");
    }
    this.uncaughtExceptionHandler = uncaughtExceptionHandler;
    return this;
  }

  @Override
  public ThreadGroupPool.Builder setIgnoreDaemonThreads(boolean ignoreDaemonThreads) {
    this.ignoreDaemonThreads = ignoreDaemonThreads;
    set$0 |= (byte) 1;
    return this;
  }

  @Override
  public ThreadGroupPool build() {
    if (set$0 != 1
        || this.parentThreadGroup == null
        || this.threadGroupNamePrefix == null
        || this.uncaughtExceptionHandler == null) {
      StringBuilder missing = new StringBuilder();
      if (this.parentThreadGroup == null) {
        missing.append(" parentThreadGroup");
      }
      if (this.threadGroupNamePrefix == null) {
        missing.append(" threadGroupNamePrefix");
      }
      if (this.uncaughtExceptionHandler == null) {
        missing.append(" uncaughtExceptionHandler");
      }
      if ((set$0 & 1) == 0) {
        missing.append(" ignoreDaemonThreads");
      }
      throw new IllegalStateException("Missing required properties:" + missing);
    }
    return new ThreadGroupPool(
        this.parentThreadGroup,
        this.threadGroupNamePrefix,
        this.uncaughtExceptionHandler,
        this.ignoreDaemonThreads);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy