@Test void testConvertWithClassifierAndType() throws SecurityException { this.artifactModel.setClassifier("classifier"); this.artifactModel.setType("type"); Extension extension = this.converter.convert(Extension.class, artifactModel); assertEquals("groupid:artifactid:classifier", extension.getId().getId()); assertEquals("type", extension.getType()); }
@Override public <G> G convert(Type targetType, Object sourceValue) { if (targetType == Extension.class) { return (G) convertToExtension((ArtifactModel) sourceValue); } else { throw new ConversionException(String.format("Unsupported target type [%s]", targetType)); } }
ArtifactModelConverter extends AbstractModelConverter<ArtifactModel> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (targetType == Extension.class) { return (G) convertToExtension((ArtifactModel) sourceValue); } else { throw new ConversionException(String.format("Unsupported target type [%s]", targetType)); } } }
ArtifactModelConverter extends AbstractModelConverter<ArtifactModel> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (targetType == Extension.class) { return (G) convertToExtension((ArtifactModel) sourceValue); } else { throw new ConversionException(String.format("Unsupported target type [%s]", targetType)); } }  }
ArtifactModelConverter extends AbstractModelConverter<ArtifactModel> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (targetType == Extension.class) { return (G) convertToExtension((ArtifactModel) sourceValue); } else { throw new ConversionException(String.format("Unsupported target type [%s]", targetType)); } }  @Override G convert(Type targetType, Object sourceValue); }
ArtifactModelConverter extends AbstractModelConverter<ArtifactModel> { @Override public <G> G convert(Type targetType, Object sourceValue) { if (targetType == Extension.class) { return (G) convertToExtension((ArtifactModel) sourceValue); } else { throw new ConversionException(String.format("Unsupported target type [%s]", targetType)); } }  @Override G convert(Type targetType, Object sourceValue); static final ParameterizedType ROLE; }