Generics: make compiler happy about nested extends

Signed-off-by: Merlijn van Deen <m.vandeen@fugro.com>
This commit is contained in:
Merlijn van Deen 2024-09-26 14:21:12 +02:00
parent bb794f5deb
commit 9a4b8df0d1
15 changed files with 19 additions and 19 deletions

View File

@ -21,7 +21,7 @@ import generalDatabase.SQLLoggingAddon;
* @see SoloAnnotationType * @see SoloAnnotationType
* *
*/ */
public abstract class DataAnnotationType<TDataAnnotation extends DataAnnotation> { public abstract class DataAnnotationType<TDataAnnotation extends DataAnnotation<?>> {
public abstract String getAnnotationName(); public abstract String getAnnotationName();

View File

@ -5,7 +5,7 @@ import PamguardMVC.dataSelector.DataSelectorCreator;
import annotation.DataAnnotation; import annotation.DataAnnotation;
import annotation.DataAnnotationType; import annotation.DataAnnotationType;
public abstract class AnnotationDataSelCreator<TDataAnnotation extends DataAnnotation> extends DataSelectorCreator { public abstract class AnnotationDataSelCreator<TDataAnnotation extends DataAnnotation<?>> extends DataSelectorCreator {
private DataAnnotationType<TDataAnnotation> dataAnnotationType; private DataAnnotationType<TDataAnnotation> dataAnnotationType;

View File

@ -7,7 +7,7 @@ import PamguardMVC.dataSelector.DataSelector;
import annotation.DataAnnotation; import annotation.DataAnnotation;
import annotation.DataAnnotationType; import annotation.DataAnnotationType;
public abstract class AnnotationDataSelector<TDataAnnotation extends DataAnnotation> extends DataSelector { public abstract class AnnotationDataSelector<TDataAnnotation extends DataAnnotation<?>> extends DataSelector {
private DataAnnotationType<TDataAnnotation> annotationType; private DataAnnotationType<TDataAnnotation> annotationType;

View File

@ -8,7 +8,7 @@ import annotation.DataAnnotation;
import annotation.DataAnnotationType; import annotation.DataAnnotationType;
import pamViewFX.fxSettingsPanes.DynamicSettingsPane; import pamViewFX.fxSettingsPanes.DynamicSettingsPane;
public abstract class ScalarDataSelector<TDataAnnotation extends DataAnnotation> extends AnnotationDataSelector<TDataAnnotation> { public abstract class ScalarDataSelector<TDataAnnotation extends DataAnnotation<?>> extends AnnotationDataSelector<TDataAnnotation> {
/** /**
* @return the scalarDataParams * @return the scalarDataParams

View File

@ -3,11 +3,11 @@ package annotation.string;
import annotation.DataAnnotation; import annotation.DataAnnotation;
import annotation.DataAnnotationType; import annotation.DataAnnotationType;
public class StringAnnotation extends DataAnnotation { public class StringAnnotation<T extends DataAnnotationType<?>> extends DataAnnotation<T> {
private String string; private String string;
public StringAnnotation(DataAnnotationType dataAnnotationType) { public StringAnnotation(T dataAnnotationType) {
super(dataAnnotationType); super(dataAnnotationType);
} }

View File

@ -13,7 +13,7 @@ import annotation.handler.AnnotationOptions;
* @author Doug Gillespie * @author Doug Gillespie
* *
*/ */
public class StringAnnotationType extends DataAnnotationType<StringAnnotation> { public class StringAnnotationType extends DataAnnotationType<StringAnnotation<?>> {
private String annotationName; private String annotationName;
private StringSQLLogging sqlAddon; private StringSQLLogging sqlAddon;

View File

@ -4,11 +4,11 @@ import PamUtils.PamCalendar;
import annotation.DataAnnotation; import annotation.DataAnnotation;
import annotation.DataAnnotationType; import annotation.DataAnnotationType;
public class TimestampAnnotation extends DataAnnotation { public class TimestampAnnotation<T extends DataAnnotationType<?>> extends DataAnnotation<T> {
private long timestamp; private long timestamp;
public TimestampAnnotation(DataAnnotationType dataAnnotationType) { public TimestampAnnotation(T dataAnnotationType) {
super(dataAnnotationType); super(dataAnnotationType);
} }

View File

@ -12,7 +12,7 @@ import annotation.DataAnnotationType;
* @author Doug Gillespie * @author Doug Gillespie
* *
*/ */
public class TimestampAnnotationType extends DataAnnotationType<TimestampAnnotation> { public class TimestampAnnotationType extends DataAnnotationType<TimestampAnnotation<?>> {
private String annotationName; private String annotationName;
private TimestampSQLLogging sqlAddon; private TimestampSQLLogging sqlAddon;

View File

@ -3,14 +3,14 @@ package annotation.userforms;
import annotation.DataAnnotation; import annotation.DataAnnotation;
import annotation.DataAnnotationType; import annotation.DataAnnotationType;
public class UserFormAnnotation extends DataAnnotation { public class UserFormAnnotation<T extends DataAnnotationType<?>> extends DataAnnotation<T> {
/** /**
* Data extracted from the logger form. * Data extracted from the logger form.
*/ */
private Object[] loggerFormData; private Object[] loggerFormData;
public UserFormAnnotation(DataAnnotationType dataAnnotationType, Object[] loggerFormData) { public UserFormAnnotation(T dataAnnotationType, Object[] loggerFormData) {
super(dataAnnotationType); super(dataAnnotationType);
this.setLoggerFormData(loggerFormData); this.setLoggerFormData(loggerFormData);
} }

View File

@ -17,7 +17,7 @@ import loggerForms.FormDescription;
import loggerForms.FormsControl; import loggerForms.FormsControl;
import loggerForms.LoggerForm; import loggerForms.LoggerForm;
public class UserFormAnnotationType extends DataAnnotationType<UserFormAnnotation> { public class UserFormAnnotationType extends DataAnnotationType<UserFormAnnotation<?>> {
private UserFormAnnotationOptions userFormAnnotationOptions; private UserFormAnnotationOptions userFormAnnotationOptions;
@ -201,7 +201,7 @@ public class UserFormAnnotationType extends DataAnnotationType<UserFormAnnotatio
} }
@Override @Override
public AnnotationBinaryHandler<UserFormAnnotation> getBinaryHandler() { public AnnotationBinaryHandler<UserFormAnnotation<?>> getBinaryHandler() {
if (userFormBinaryHandler == null) { if (userFormBinaryHandler == null) {
synchronized (this) { synchronized (this) {
if (userFormBinaryHandler == null) { if (userFormBinaryHandler == null) {

View File

@ -16,7 +16,7 @@ import us.hebi.matlab.mat.types.Struct;
* @author Jamie Macaulay * @author Jamie Macaulay
* *
*/ */
public class MLCPODExport extends MLDataUnitExport<PamDataUnit>{ public class MLCPODExport extends MLDataUnitExport<PamDataUnit<?, ?>>{
@Override @Override
public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) { public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) {

View File

@ -14,7 +14,7 @@ import us.hebi.matlab.mat.types.Struct;
* @author Jamie Macaulay * @author Jamie Macaulay
* *
*/ */
public class MLRawExport extends MLDataUnitExport<PamDataUnit>{ public class MLRawExport extends MLDataUnitExport<PamDataUnit<?,?>>{
@Override @Override
public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) { public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) {

View File

@ -10,7 +10,7 @@ import cpod.CPODClick;
import export.MLExport.MLCPODExport; import export.MLExport.MLCPODExport;
public class RCPODExport extends RDataUnitExport<PamDataUnit> { public class RCPODExport extends RDataUnitExport<PamDataUnit<?, ?>> {
@Override @Override
public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) { public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) {

View File

@ -10,7 +10,7 @@ import org.renjin.sexp.ListVector.NamedBuilder;
import clickDetector.ClickDetection; import clickDetector.ClickDetection;
public class RRawExport extends RDataUnitExport<PamDataUnit> { public class RRawExport extends RDataUnitExport<PamDataUnit<?,?>> {
@Override @Override
public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) { public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) {

View File

@ -9,7 +9,7 @@ import clickDetector.ClickDetection;
* @author Jamie Macaulay * @author Jamie Macaulay
* *
*/ */
public class RawHolderWavExport extends WavDataUnitExport<PamDataUnit> { public class RawHolderWavExport extends WavDataUnitExport<PamDataUnit<?,?>> {
@Override @Override
public double[][] getWavClip(PamDataUnit dataUnit) { public double[][] getWavClip(PamDataUnit dataUnit) {