Skip to content

Commit

Permalink
Inline AccessMethodType.java into PropertyModel
Browse files Browse the repository at this point in the history
Signed-off-by: Gyúróczki Gergő <gergonoorbi@gmail.com>
  • Loading branch information
Degubi authored and Verdent committed Oct 10, 2019
1 parent 5f869a7 commit 0c18f1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 39 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public class PropertyModel implements Comparable<PropertyModel> {

private final JsonbSerializer<?> propertySerializer;

private final AccessMethodType getterMethodType;
private final Type getterMethodType;

private final AccessMethodType setterMethodType;
private final Type setterMethodType;

/**
* Creates an instance.
Expand All @@ -93,8 +93,8 @@ public PropertyModel(ClassModel classModel, Property property, JsonbContext json
this.propertyName = property.getName();
this.propertyType = property.getPropertyType();
this.propagation = new ReflectionPropagation(property, classModel.getClassCustomization().getPropertyVisibilityStrategy());
this.getterMethodType = propagation.isGetterVisible() ? new AccessMethodType(property.getGetterType()) : null;
this.setterMethodType = propagation.isSetterVisible() ? new AccessMethodType(property.getSetterType()) : null;
this.getterMethodType = propagation.isGetterVisible() ? property.getGetterType() : null;
this.setterMethodType = propagation.isSetterVisible() ? property.getSetterType() : null;
this.customization = introspectCustomization(property, jsonbContext);
this.readName = calculateReadWriteName(customization.getJsonReadName(), jsonbContext.getConfigProperties().getPropertyNamingStrategy());
this.writeName = calculateReadWriteName(customization.getJsonWriteName(), jsonbContext.getConfigProperties().getPropertyNamingStrategy());
Expand Down Expand Up @@ -135,7 +135,7 @@ private JsonbSerializer<?> resolveCachedSerializer() {
* @return deserialization type
*/
public Type getPropertyDeserializationType() {
return setterMethodType == null ? propertyType : setterMethodType.getMethodType();
return setterMethodType == null ? propertyType : setterMethodType;
}

/**
Expand All @@ -144,7 +144,7 @@ public Type getPropertyDeserializationType() {
* @return serialization type
*/
public Type getPropertySerializationType() {
return getterMethodType == null ? propertyType : getterMethodType.getMethodType();
return getterMethodType == null ? propertyType : getterMethodType;
}

private SerializerBinding<?> getUserSerializerBinding(Property property, JsonbContext jsonbContext) {
Expand Down

0 comments on commit 0c18f1f

Please sign in to comment.