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

io.smallrye.beanbag.BeanDefinition Maven / Gradle / Ivy

The newest version!
package io.smallrye.beanbag;

import java.util.Set;

/**
 * The formal definition of a bean.
 */
final class BeanDefinition {
    private final String name;
    private final int priority;
    private final Class type;
    private final Set> restrictedTypes;
    private final BeanSupplier supplier;

    BeanDefinition(final String name, final int priority, final Class type, final Set> restrictedTypes,
            final BeanSupplier supplier) {
        this.name = name;
        this.priority = priority;
        this.type = type;
        this.restrictedTypes = restrictedTypes;
        this.supplier = supplier;
    }

    public String getName() {
        return name;
    }

    public int getPriority() {
        return priority;
    }

    public Class getType() {
        return type;
    }

    public Set> getRestrictedTypes() {
        return restrictedTypes;
    }

    public BeanSupplier getBeanSupplier() {
        return supplier;
    }

    public String toString() {
        return "Definition for " + getType() + ", name=" + getName() + ", types=" + getRestrictedTypes();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy