Beispiel #1
0
 @Override
 public void setupModule(SetupContext context) {
   if (_serializers != null) {
     context.addSerializers(_serializers);
   }
   if (_deserializers != null) {
     context.addDeserializers(_deserializers);
   }
   if (_keySerializers != null) {
     context.addKeySerializers(_keySerializers);
   }
   if (_keyDeserializers != null) {
     context.addKeyDeserializers(_keyDeserializers);
   }
   if (_abstractTypes != null) {
     context.addAbstractTypeResolver(_abstractTypes);
   }
   if (_valueInstantiators != null) {
     context.addValueInstantiators(_valueInstantiators);
   }
   if (_subtypes != null && _subtypes.size() > 0) {
     context.registerSubtypes(_subtypes.toArray(new NamedType[_subtypes.size()]));
   }
   if (_mixins != null) {
     for (Map.Entry<Class<?>, Class<?>> entry : _mixins.entrySet()) {
       context.setMixInAnnotations(entry.getKey(), entry.getValue());
     }
   }
 }
 @Override
 public void setupModule(SetupContext context) {
   context.setMixInAnnotations(TwitterProfile.class, TwitterProfileMixin.class);
   context.setMixInAnnotations(SavedSearch.class, SavedSearchMixin.class);
   context.setMixInAnnotations(Trend.class, TrendMixin.class);
   context.setMixInAnnotations(Trends.class, TrendsMixin.class);
   context.setMixInAnnotations(SuggestionCategory.class, SuggestionCategoryMixin.class);
   context.setMixInAnnotations(DirectMessage.class, DirectMessageMixin.class);
   context.setMixInAnnotations(UserList.class, UserListMixin.class);
   context.setMixInAnnotations(Tweet.class, TweetMixin.class);
   context.setMixInAnnotations(SearchResults.class, SearchResultsMixin.class);
   context.setMixInAnnotations(Place.class, PlaceMixin.class);
   context.setMixInAnnotations(SimilarPlacesResponse.class, SimilarPlacesMixin.class);
   context.setMixInAnnotations(Entities.class, EntitiesMixin.class);
   context.setMixInAnnotations(HashTagEntity.class, HashTagEntityMixin.class);
   context.setMixInAnnotations(MediaEntity.class, MediaEntityMixin.class);
   context.setMixInAnnotations(MentionEntity.class, MentionEntityMixin.class);
   context.setMixInAnnotations(UrlEntity.class, UrlEntityMixin.class);
   context.setMixInAnnotations(AccountSettings.class, AccountSettingsMixin.class);
   context.setMixInAnnotations(
       AccountSettings.TimeZone.class, AccountSettingsMixin.TimeZoneMixin.class);
   context.setMixInAnnotations(
       AccountSettings.SleepTime.class, AccountSettingsMixin.SleepTimeMixin.class);
   context.setMixInAnnotations(
       AccountSettings.TrendLocation.class, AccountSettingsMixin.TrendLocationMixin.class);
   context.setMixInAnnotations(OEmbedTweet.class, OEmbedTweetMixin.class);
 }
 @Override
 public void setupModule(SetupContext context) {
   super.setupModule(context);
   context.setMixInAnnotations(Swagger.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Info.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(License.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Scheme.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(SecurityRequirement.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(SecuritySchemeDefinition.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Model.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Property.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Operation.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Path.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Response.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Parameter.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(ExternalDocs.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Xml.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Tag.class, CustomizedSwaggerSerializer.class);
   context.setMixInAnnotations(Contact.class, CustomizedSwaggerSerializer.class);
 }