Skip to content

Commit

Permalink
ModelSerializerExtension optional methods with default implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
twozniak committed Sep 17, 2020
1 parent b92715a commit 8b0440f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
import com.blueveery.springrest2ts.tsmodel.TSMethod;
import com.blueveery.springrest2ts.tsmodel.TSParameter;

import java.util.Collections;
import java.util.List;

public interface ModelSerializerExtension {
void addComplexTypeUsage(TSComplexElement tsComplexElement);

void addImplementationSpecificFields(TSComplexElement tsComplexElement);
default void addImplementationSpecificFields(TSComplexElement tsComplexElement) {
}

List<TSParameter> getImplementationSpecificParameters(TSMethod method);
default List<TSParameter> getImplementationSpecificParameters(TSMethod method) {
return Collections.emptyList();
}

String generateSerializationCode(String modelVariableName);

Expand Down

0 comments on commit 8b0440f

Please sign in to comment.