/** * Checks if property is annotated transient. If JsonbTransient annotation is present on field getter or setter, and other annotation is present * on either of it, JsonbException is thrown with message describing collision. * * @param property The property to inspect if there is any {@link JsonbTransient} annotation defined for it * @return Set of {@link AnnotationTarget}s specifying in which scope the {@link JsonbTransient} is applied */ public EnumSet<AnnotationTarget> getJsonbTransientCategorized(Property property) { Objects.requireNonNull(property); EnumSet<AnnotationTarget> transientTarget = EnumSet.noneOf(AnnotationTarget.class); Map<AnnotationTarget, JsonbTransient> annotationFromPropertyCategorized = getAnnotationFromPropertyCategorized(JsonbTransient.class, property); if (annotationFromPropertyCategorized.size() > 0) { transientTarget.addAll(annotationFromPropertyCategorized.keySet()); return transientTarget; } return transientTarget; }
@JsonbTransient @JsonbProperty("custom_name") public void setTransientProperty(String transientProperty) { this.transientProperty = transientProperty; }
@JsonbTransient public String getInstance() { return instance; }
@JsonbTransient @JsonbProperty("custom_name") public String getTransientProperty() { return transientProperty; }
@JsonbTransient public void setInstance(String instance) { this.instance = instance; }
@JsonbTransient public String getGetterTransient() { return getterTransient; }
@JsonbTransient public void setSetterTransient(String setterTransient) { this.setterTransient = setterTransient; }
@JsonbTransient public String getGetterAndPropertyTransient() { return getterAndPropertyTransient; }
@JsonbTransient public void setSetterAndPropertyTransient(String setterAndPropertyTransient) { this.setterAndPropertyTransient = setterAndPropertyTransient; }
@JsonbTransient public String getSetterAndGetterTransient() { return setterAndGetterTransient; }
@JsonbTransient public void setSetterAndGetterTransient(String setterAndGetterTransient) { this.setterAndGetterTransient = setterAndGetterTransient; }
@JsonbTransient public String getSetterAndGetterAndPropertyTransient() { return setterAndGetterAndPropertyTransient; }
@JsonbTransient public void setSetterAndGetterAndPropertyTransient(String setterAndGetterAndPropertyTransient) { this.setterAndGetterAndPropertyTransient = setterAndGetterAndPropertyTransient; }
private boolean isTransient(final DecoratedType t) { return t.getAnnotation(JsonbTransient.class) != null; }