當前位置: 首頁>>代碼示例>>Java>>正文


Java Module.SetupContext方法代碼示例

本文整理匯總了Java中com.fasterxml.jackson.databind.Module.SetupContext方法的典型用法代碼示例。如果您正苦於以下問題:Java Module.SetupContext方法的具體用法?Java Module.SetupContext怎麽用?Java Module.SetupContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.fasterxml.jackson.databind.Module的用法示例。


在下文中一共展示了Module.SetupContext方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    super.setupModule(context);
    context.setMixInAnnotations(Id.class, IdConfiguration.class);
    context.setMixInAnnotations(BrandRef.class, ResourceRefConfiguration.class);
    context.setMixInAnnotations(TopicRef.class, ResourceRefConfiguration.class);
    context.setMixInAnnotations(ItemRef.class, ItemRefConfiguration.class);
    context.setMixInAnnotations(EpisodeRef.class, ItemRefConfiguration.class);
    context.setMixInAnnotations(SongRef.class, ItemRefConfiguration.class);
    context.setMixInAnnotations(FilmRef.class, ItemRefConfiguration.class);
    context.setMixInAnnotations(ClipRef.class, ItemRefConfiguration.class);
    context.setMixInAnnotations(SeriesRef.class, SeriesRefConfiguration.class);
    context.setMixInAnnotations(BroadcastRef.class, BroadcastRefConfiguration.class);
    context.setMixInAnnotations(ScheduleRef.class, ScheduleRefConfiguration.class);
    context.setMixInAnnotations(
            ScheduleRef.Entry.class,
            ScheduleRefConfiguration.Entry.class
    );
    context.setMixInAnnotations(Timestamp.class, TimestampConfiguration.class);
    SimpleDeserializers desers = new SimpleDeserializers();
    context.addDeserializers(desers);
}
 
開發者ID:atlasapi,項目名稱:atlas-deer,代碼行數:23,代碼來源:JacksonMessageSerializer.java

示例2: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext sc) {
    sc.setMixInAnnotations(MeterValuesRequest.class, MeterValue15Mixin.class);

    // Enums from CP
    sc.setMixInAnnotations(ocpp.cp._2012._06.AuthorizationStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(AvailabilityStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(AvailabilityType.class, EnumMixin.class);
    sc.setMixInAnnotations(CancelReservationStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ClearCacheStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ConfigurationStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ocpp.cp._2012._06.DataTransferStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(RemoteStartStopStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ReservationStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ResetStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ResetType.class, EnumMixin.class);
    sc.setMixInAnnotations(UnlockStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(UpdateStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(UpdateType.class, EnumMixin.class);

    // Enums from CS
    sc.setMixInAnnotations(ocpp.cs._2012._06.AuthorizationStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ChargePointErrorCode.class, EnumMixin.class);
    sc.setMixInAnnotations(ChargePointStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(ocpp.cs._2012._06.DataTransferStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(DiagnosticsStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(FirmwareStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(Location.class, EnumMixin.class);
    sc.setMixInAnnotations(Measurand.class, EnumMixin.class);
    sc.setMixInAnnotations(ReadingContext.class, EnumMixin.class);
    sc.setMixInAnnotations(RegistrationStatus.class, EnumMixin.class);
    sc.setMixInAnnotations(UnitOfMeasure.class, EnumMixin.class);
    sc.setMixInAnnotations(ValueFormat.class, EnumMixin.class);
}
 
開發者ID:RWTH-i5-IDSG,項目名稱:steve-plugsurfing,代碼行數:35,代碼來源:Ocpp15JacksonModule.java

示例3: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
public void setupModule(Module.SetupContext paramSetupContext)
{
  if (this._serializers != null)
    paramSetupContext.addSerializers(this._serializers);
  if (this._deserializers != null)
    paramSetupContext.addDeserializers(this._deserializers);
  if (this._keySerializers != null)
    paramSetupContext.addKeySerializers(this._keySerializers);
  if (this._keyDeserializers != null)
    paramSetupContext.addKeyDeserializers(this._keyDeserializers);
  if (this._abstractTypes != null)
    paramSetupContext.addAbstractTypeResolver(this._abstractTypes);
  if (this._valueInstantiators != null)
    paramSetupContext.addValueInstantiators(this._valueInstantiators);
  if (this._deserializerModifier != null)
    paramSetupContext.addBeanDeserializerModifier(this._deserializerModifier);
  if (this._serializerModifier != null)
    paramSetupContext.addBeanSerializerModifier(this._serializerModifier);
  if ((this._subtypes != null) && (this._subtypes.size() > 0))
    paramSetupContext.registerSubtypes((NamedType[])this._subtypes.toArray(new NamedType[this._subtypes.size()]));
  if (this._mixins != null)
  {
    Iterator localIterator = this._mixins.entrySet().iterator();
    while (localIterator.hasNext())
    {
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      paramSetupContext.setMixInAnnotations((Class)localEntry.getKey(), (Class)localEntry.getValue());
    }
  }
}
 
開發者ID:mmmsplay10,項目名稱:QuizUpWinner,代碼行數:31,代碼來源:SimpleModule.java

示例4: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
/**
 * Setup module.
 *
 * @param context The setup context
 */
@Override
public void setupModule(Module.SetupContext context) {
    AnnotationIntrospector ai = annotationIntrospector();
    if (ai != null) {
        context.appendAnnotationIntrospector(ai);
    }
    context.addSerializers(new HibernateSerializers(false, true, null));
    context.addBeanSerializerModifier(new HibernateLazyLoadCollectionSerializerModifier());
}
 
開發者ID:NASA-Tournament-Lab,項目名稱:CoECI-OPM-Service-Credit-Redeposit-Deposit-Application,代碼行數:15,代碼來源:Helper.java

示例5: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    SimpleSerializers serializers = new SimpleSerializers();
    SimpleDeserializers deserializers = new SimpleDeserializers();

    serializers.addSerializer(ModelObjectInterface.class, new NoJpaSerializer());
    serializers.addSerializer(Calendar.class, new CalendarSerializer());
    serializers.addSerializer(NList.class, new NListSerializer());
    context.addSerializers(serializers);
    context.addDeserializers(deserializers);
}
 
開發者ID:NoJPA-LESS-IS-MORE,項目名稱:NoJPA,代碼行數:12,代碼來源:NoJpaModule.java

示例6: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    context.addDeserializers(new TotallylazyDeserializers());
}
 
開發者ID:blomqvie,項目名稱:android-rxjava-training,代碼行數:5,代碼來源:TotallylazyModule.java

示例7: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    super.setupModule(context);
    context.insertAnnotationIntrospector(new EnumNamingAnnotationIntrospector());
}
 
開發者ID:dnault,項目名稱:therapi-json-rpc,代碼行數:6,代碼來源:EnumRenamingModule.java

示例8: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    context.addSerializers(new TinyTypesSerializers());
}
 
開發者ID:caligin,項目名稱:tinytypes,代碼行數:5,代碼來源:TinyTypesSerializersTest.java

示例9: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    context.addDeserializers(new TinyTypesDeserializers());
}
 
開發者ID:caligin,項目名稱:tinytypes,代碼行數:5,代碼來源:TinyTypesDeserializersTest.java

示例10: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    context.addKeySerializers(new TinyTypesKeySerializers());
}
 
開發者ID:caligin,項目名稱:tinytypes,代碼行數:5,代碼來源:TinyTypesKeySerializersTest.java

示例11: setupModule

import com.fasterxml.jackson.databind.Module; //導入方法依賴的package包/類
@Override
public void setupModule(Module.SetupContext context) {
    context.addKeyDeserializers(new TinyTypesKeyDeserializers());
}
 
開發者ID:caligin,項目名稱:tinytypes,代碼行數:5,代碼來源:TinyTypesKeyDeserializersTest.java


注:本文中的com.fasterxml.jackson.databind.Module.SetupContext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。