proguard.classfile.kotlin.KotlinMetadataVersion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proguard-core Show documentation
Show all versions of proguard-core Show documentation
ProGuardCORE is a free library to read, analyze, modify, and write Java class files.
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2021 Guardsquare NV
*/
package proguard.classfile.kotlin;
/**
* Small container for KotlinMetadataVersion metadata (mv).
*/
public class KotlinMetadataVersion
{
public final int major;
public final int minor;
public final int patch;
public KotlinMetadataVersion(int[] version)
{
this(version[0], version[1], version[2]);
}
public KotlinMetadataVersion(int major, int minor)
{
this(major, minor, -1);
}
public KotlinMetadataVersion(int major, int minor, int patch)
{
this.major = major;
this.minor = minor;
this.patch = patch;
}
public String toString()
{
return this.major + "." + this.minor + (this.patch != -1 ? "." + this.patch : "");
}
public int[] toArray()
{
return new int[] { major, minor, patch == -1 ? 0 : patch };
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy