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

io.quarkus.runtime.RuntimeValue Maven / Gradle / Ivy

The newest version!
package io.quarkus.runtime;

import java.util.Objects;

/**
 * Represents a proxyable object that can be returned from a bytecode recorder,
 * and passed between recorders.
 *
 */
public class RuntimeValue {

    private final T value;

    public RuntimeValue(T value) {
        Objects.requireNonNull(value);
        this.value = value;
    }

    public RuntimeValue() {
        this.value = null;
    }

    public T getValue() {
        if (value == null) {
            throw new IllegalStateException("Cannot call getValue() at deployment time");
        }
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy