net.nemerosa.ontrack.model.support.JsonViewClass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.support;
import net.nemerosa.ontrack.model.structure.ViewSupplier;
import java.util.Collection;
public final class JsonViewClass {
private JsonViewClass() {
}
public static Class> getViewClass(Object any) {
if (any instanceof ViewSupplier) {
return ((ViewSupplier) any).getViewType();
} else if (any instanceof Collection>) {
return Object.class;
} else if (any != null) {
return any.getClass();
} else {
return Object.class;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy