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

io.sentry.OptionsContainer Maven / Gradle / Ivy

There is a newer version: 8.0.0-rc.4
Show newest version
package io.sentry;

import java.lang.reflect.InvocationTargetException;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

@ApiStatus.Internal
public final class OptionsContainer {

  public @NotNull static  OptionsContainer create(final @NotNull Class clazz) {
    return new OptionsContainer<>(clazz);
  }

  private final @NotNull Class clazz;

  private OptionsContainer(final @NotNull Class clazz) {
    super();
    this.clazz = clazz;
  }

  public @NotNull T createInstance()
      throws InstantiationException, IllegalAccessException, NoSuchMethodException,
          InvocationTargetException {
    return clazz.getDeclaredConstructor().newInstance();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy