aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com/yahoo/jdisc/application/BsnVersion.java
blob: 40573eee3b248ca07031dca06f3bb40ba32f5deb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.yahoo.jdisc.application;

import org.osgi.framework.Bundle;
import org.osgi.framework.Version;

/**
 * A bundle's symbolic name and version.
 *
 * @author gjoranv
 */
public record BsnVersion(String symbolicName, Version version) {

    public BsnVersion(Bundle bundle) {
        this(bundle.getSymbolicName(), bundle.getVersion());
    }

    public String toReadableString() {
        return symbolicName + " version:" + version;
    }

}