@SuppressWarnings("deprecation") @Override public String findGettablePropertyName(AnnotatedMethod am) { /* 22-May-2009, tatu: JsonProperty is the primary annotation * to check for */ JsonProperty pann = am.getAnnotation(JsonProperty.class); if (pann != null) { return pann.value(); } /* 22-May-2009, tatu: JsonGetter is deprecated as of 1.1 * but still supported */ JsonGetter ann = am.getAnnotation(JsonGetter.class); if (ann != null) { return ann.value(); } /* 22-May-2009, tatu: And finally, JsonSerialize implies * that there is a property, although doesn't define name */ // 09-Apr-2010, tatu: Ditto for JsonView if (am.hasAnnotation(JsonSerialize.class) || am.hasAnnotation(JsonView.class)) { return ""; } return null; }
@JsonGetter("Description") public String getDescription() { return description; }
@JsonGetter("Description") public String getDescription() { return description; }
@SuppressWarnings("deprecation") @Override public String findGettablePropertyName(AnnotatedMethod am) { /* 22-May-2009, tatu: JsonProperty is the primary annotation * to check for */ JsonProperty pann = am.getAnnotation(JsonProperty.class); if (pann != null) { return pann.value(); } /* 22-May-2009, tatu: JsonGetter is deprecated as of 1.1 * but still supported */ JsonGetter ann = am.getAnnotation(JsonGetter.class); if (ann != null) { return ann.value(); } /* 22-May-2009, tatu: And finally, JsonSerialize implies * that there is a property, although doesn't define name */ // 09-Apr-2010, tatu: Ditto for JsonView if (am.hasAnnotation(JsonSerialize.class) || am.hasAnnotation(JsonView.class)) { return ""; } return null; }
@JsonGetter("Name") public String getName() { if (name == null || name.isEmpty()) { throw new IllegalArgumentException("OEM Name is missing"); } return this.name; }
@Override public String findGettablePropertyName(AnnotatedMethod am) { /* 22-May-2009, tatu: JsonProperty is the primary annotation * to check for */ JsonProperty pann = am.getAnnotation(JsonProperty.class); if (pann != null) { return pann.value(); } /* 22-May-2009, tatu: JsonGetter is deprecated as of 1.1 * but still supported */ JsonGetter ann = am.getAnnotation(JsonGetter.class); if (ann != null) { return ann.value(); } /* 22-May-2009, tatu: And finally, JsonSerialize implies * that there is a property, although doesn't define name */ if (am.hasAnnotation(JsonSerialize.class)) { return ""; } return null; }
@JsonGetter("Name") public String getName() { if (name == null || name.isEmpty()) { throw new IllegalArgumentException("OS Name is missing"); } return this.name; }
@SuppressWarnings("deprecation") @Override public String findGettablePropertyName(AnnotatedMethod am) { /* 22-May-2009, tatu: JsonProperty is the primary annotation * to check for */ JsonProperty pann = am.getAnnotation(JsonProperty.class); if (pann != null) { return pann.value(); } /* 22-May-2009, tatu: JsonGetter is deprecated as of 1.1 * but still supported */ JsonGetter ann = am.getAnnotation(JsonGetter.class); if (ann != null) { return ann.value(); } /* 22-May-2009, tatu: And finally, JsonSerialize implies * that there is a property, although doesn't define name */ // 09-Apr-2010, tatu: Ditto for JsonView if (am.hasAnnotation(JsonSerialize.class) || am.hasAnnotation(JsonView.class)) { return ""; } return null; }
@JsonGetter("Version") public String getVersion() { if (version == null || version.isEmpty()) { throw new IllegalArgumentException("OS Version is missing"); } return version; }
@SuppressWarnings("deprecation") @Override public String findGettablePropertyName(AnnotatedMethod am) { /* 22-May-2009, tatu: JsonProperty is the primary annotation * to check for */ JsonProperty pann = am.getAnnotation(JsonProperty.class); if (pann != null) { return pann.value(); } /* 22-May-2009, tatu: JsonGetter is deprecated as of 1.1 * but still supported */ JsonGetter ann = am.getAnnotation(JsonGetter.class); if (ann != null) { return ann.value(); } /* 22-May-2009, tatu: And finally, JsonSerialize implies * that there is a property, although doesn't define name */ // 09-Apr-2010, tatu: Ditto for JsonView if (am.hasAnnotation(JsonSerialize.class) || am.hasAnnotation(JsonView.class)) { return ""; } return null; }
@SuppressWarnings("deprecation") @Override public String findGettablePropertyName(AnnotatedMethod am) { /* 22-May-2009, tatu: JsonProperty is the primary annotation * to check for */ JsonProperty pann = am.getAnnotation(JsonProperty.class); if (pann != null) { return pann.value(); } /* 22-May-2009, tatu: JsonGetter is deprecated as of 1.1 * but still supported */ JsonGetter ann = am.getAnnotation(JsonGetter.class); if (ann != null) { return ann.value(); } /* 22-May-2009, tatu: And finally, JsonSerialize implies * that there is a property, although doesn't define name */ // 09-Apr-2010, tatu: Ditto for JsonView if (am.hasAnnotation(JsonSerialize.class) || am.hasAnnotation(JsonView.class)) { return ""; } return null; }
propertyName = getterInfo.value();
propertyName = getterInfo.value();