当前位置: 首页>>代码示例>>Java>>正文


Java JsonCreator类代码示例

本文整理汇总了Java中com.fasterxml.jackson.annotation.JsonCreator的典型用法代码示例。如果您正苦于以下问题:Java JsonCreator类的具体用法?Java JsonCreator怎么用?Java JsonCreator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JsonCreator类属于com.fasterxml.jackson.annotation包,在下文中一共展示了JsonCreator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JdbcStorageConfig

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public JdbcStorageConfig(
    @JsonProperty("driver") String driver,
    @JsonProperty("url") String url,
    @JsonProperty("username") String username,
    @JsonProperty("password") String password,
    @JsonProperty(value = "fetchSize", defaultValue = "0") int fetchSize,
    @JsonProperty("database") String database,
    @JsonProperty(value = "showOnlyConnDatabase", defaultValue = "false") boolean showOnlyConnDatabase) {
  super();
  this.driver = driver;
  this.url = url;
  this.username = username;
  this.password = password;
  this.fetchSize = fetchSize;
  this.database = database;
  this.showOnlyConnDatabase = showOnlyConnDatabase;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:19,代码来源:JdbcStorageConfig.java

示例2: OrderedPartitionSender

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public OrderedPartitionSender(@JsonProperty("orderings") List<Ordering> orderings,
                              @JsonProperty("ref") FieldReference ref,
                              @JsonProperty("child") PhysicalOperator child,
                              @JsonProperty("destinations") List<MinorFragmentEndpoint> endpoints,
                              @JsonProperty("receiver-major-fragment") int oppositeMajorFragmentId,
                              @JsonProperty("sending-fragment-width") int sendingWidth,
                              @JsonProperty("recordsToSample") int recordsToSample,
                              @JsonProperty("samplingFactor") int samplingFactor,
                              @JsonProperty("completionFactor") float completionFactor) {
  super(oppositeMajorFragmentId, child, endpoints);
  if (orderings == null) {
    this.orderings = Lists.newArrayList();
  } else {
    this.orderings = orderings;
  }
  this.ref = ref;
  this.sendingWidth = sendingWidth;
  this.recordsToSample = recordsToSample;
  this.samplingFactor = samplingFactor;
  this.completionFactor = completionFactor;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:23,代码来源:OrderedPartitionSender.java

示例3: Event

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public Event(@JsonProperty("eventName") String eventName,
    @JsonProperty("eventSource") String eventSource,
    @JsonProperty("eventTime") String eventTime,
    @JsonProperty("eventVersion") String eventVersion,
    @JsonProperty("oss") Oss oss,
    @JsonProperty("region") String region,
    @JsonProperty("requestParameters") RequestParameters requestParameters,
    @JsonProperty("responseElements") ResponseElements responseElements,
    @JsonProperty("userIdentity") UserIdentity userIdentity) {
    this.eventName = eventName;
    this.eventSource = eventSource;
    this.eventTime = eventTime;
    this.eventVersion = eventVersion;
    this.oss = oss;
    this.region = region;
    this.requestParameters = requestParameters;
    this.responseElements = responseElements;
    this.userIdentity = userIdentity;
}
 
开发者ID:aliyun,项目名称:fc-java-libs,代码行数:21,代码来源:OSSEvent.java

示例4: GoogleAccountsServiceResponseBuilder

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
/**
 * Instantiates a new Google accounts service response builder.
 *
 * @param privateKeyLocation the private key
 * @param publicKeyLocation  the public key
 * @param keyAlgorithm       the key algorithm
 * @param skewAllowance      the skew allowance
 */
@JsonCreator
public GoogleAccountsServiceResponseBuilder(@JsonProperty("privateKeyLocation") final String privateKeyLocation,
                                            @JsonProperty("publicKeyLocation") final String publicKeyLocation,
                                            @JsonProperty("keyAlgorithm") final String keyAlgorithm,
                                            @JsonProperty("skewAllowance") final int skewAllowance) {
    Assert.notNull(privateKeyLocation);
    Assert.notNull(publicKeyLocation);

    try {
        this.privateKeyLocation = privateKeyLocation;
        this.publicKeyLocation = publicKeyLocation;
        this.keyAlgorithm = keyAlgorithm;
        this.skewAllowance = skewAllowance;

        createGoogleAppsPrivateKey();
        createGoogleAppsPublicKey();
    } catch (final Exception e) {
        throw Throwables.propagate(e);
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:29,代码来源:GoogleAccountsServiceResponseBuilder.java

示例5: User

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
/**
 * @param id
 * 					Unique identifier for this user or bot.
 * @param id
 * 					True, if this user is a bot.
 * @param firstName
 * 					User's or bot's first name.
 * @param lastName
 * 					Optional. User's or bot's last name.
 * @param username
 * 					Optional. User's or bot's username.
 * @param languageCode
 * 					Optional. IETF language tag of the user's language.
 */
@JsonCreator
public User(
		@JsonProperty("id") Long id,
		@JsonProperty("is_bot") boolean isBot,
		@JsonProperty("first_name") String firstName,
		@JsonProperty("last_name") String lastName,
		@JsonProperty("username") String username,
		@JsonProperty("language_code") String languageCode) {
	Preconditions.notNull(id, "User's or bot's ID should be provided.");
	this.id = id;
	this.isBot = isBot;
	Preconditions.notNull(firstName, "User's or bot's first name should be provided.");
	this.firstName = firstName;
	this.lastName = lastName;
	this.username = username;
	this.languageCode = languageCode;
}
 
开发者ID:sgr-io,项目名称:telegram-bot-api,代码行数:32,代码来源:User.java

示例6: Limits

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public Limits(@JsonProperty("permissionEvaluationTime") Integer permissionEvaluationTime,
              @JsonProperty("permissionEvaluationCount") Integer permissionEvaluationCount)
{
    this.permissionEvaluationTime = permissionEvaluationTime;
    this.permissionEvaluationCount = permissionEvaluationCount;
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:8,代码来源:Limits.java

示例7: fromParts

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
/**
 * Static factory method used by Jackson for deserialization
 */
@SuppressWarnings("unused")
@JsonCreator
public static SecretDetailResponseV2 fromParts(
        @JsonProperty("name") String name,
        @JsonProperty("description") @Nullable String description,
        @JsonProperty("checksum") String checksum,
        @JsonProperty("createdAtSeconds") long createdAtSeconds,
        @JsonProperty("createdBy") String createdBy,
        @JsonProperty("updatedAtSeconds") long updatedAtSeconds,
        @JsonProperty("updatedBy") String updatedBy,
        @JsonProperty("metadata") @Nullable Map<String, String> metadata,
        @JsonProperty("type") @Nullable String type,
        @JsonProperty("expiry") long expiry,
        @JsonProperty("version") @Nullable Long version) {
    return builder()
            .name(name)
            .description(nullToEmpty(description))
            .checksum(checksum)
            .createdAtSeconds(createdAtSeconds)
            .createdBy(createdBy)
            .updatedAtSeconds(updatedAtSeconds)
            .updatedBy(updatedBy)
            .metadata(metadata == null ? ImmutableMap.of() : ImmutableMap.copyOf(metadata))
            .type(type)
            .expiry(expiry)
            .version(version)
            .build();
}
 
开发者ID:oneops,项目名称:secrets-proxy,代码行数:32,代码来源:SecretDetailResponseV2.java

示例8: JacksonRestCompensation

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public JacksonRestCompensation(
    @JsonProperty("retries") int retries,
    @JsonProperty("path") String path,
    @JsonProperty("method") String method,
    @JsonProperty("params") Map<String, Map<String, String>> params) {
  super(path, method, params);
  this.retries = retries <= 0? DEFAULT_RETRIES : retries;
}
 
开发者ID:apache,项目名称:incubator-servicecomb-saga,代码行数:10,代码来源:JacksonRestCompensation.java

示例9: DatasetSplitId

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public DatasetSplitId(String datasetSplitId) throws IllegalArgumentException {
  final String[] ids = datasetSplitId.split(DELIMITER, 3);
  if (ids.length != 3 || ids[0].isEmpty() || ids[1].isEmpty() || ids[2].isEmpty()) {
    throw new IllegalArgumentException("Invalid dataset split id " + datasetSplitId);
  }
  this.datasetId = ids[0];

  this.splitKey = ids[2];
  this.compoundSplitId = datasetSplitId;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:12,代码来源:DatasetSplitId.java

示例10: LastTrade

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public LastTrade(@JsonProperty("symbol") final String symbol,
                 @JsonProperty("price") final BigDecimal price,
                 @JsonProperty("size") final BigDecimal size,
                 @JsonProperty("time") final Long time) {
    this.symbol = symbol;
    this.price = price;
    this.size = size;
    this.time = time;
}
 
开发者ID:WojciechZankowski,项目名称:iextrading4j,代码行数:11,代码来源:LastTrade.java

示例11: Channel

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public Channel(
        @JsonProperty("id") String id,
        @JsonProperty("name") String name,
        @JsonProperty("is_member") boolean isMember,
        @JsonProperty("is_archived") boolean isArchived)
{
    this.id = id;
    this.name = name;
    this.isMember = isMember;
    this.isArchived = isArchived;
}
 
开发者ID:prestodb-rocks,项目名称:presto-rest,代码行数:13,代码来源:Channel.java

示例12: ServerErrorResult

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public ServerErrorResult(
    @JsonProperty(value = "message", required = true) String errorMessage,
    @JsonProperty("delay_in_ms") long delayInMs,
    @JsonProperty("ignore_on_prepare") Boolean ignoreOnPrepare) {
  super(SERVER_ERROR, errorMessage, delayInMs, ignoreOnPrepare);
}
 
开发者ID:datastax,项目名称:simulacron,代码行数:8,代码来源:ServerErrorResult.java

示例13: fromValue

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public static TypeEnum fromValue(String text) {
  for (TypeEnum b : TypeEnum.values()) {
    if (String.valueOf(b.value).equals(text)) {
      return b;
    }
  }
  return null;
}
 
开发者ID:square,项目名称:connect-java-sdk,代码行数:10,代码来源:CatalogObject.java

示例14: fromParts

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
/**
 * Static factory method used by Jackson for deserialization
 */
@SuppressWarnings("unused")
@JsonCreator
public static CreateGroupRequestV2 fromParts(
        @JsonProperty("name") String name,
        @JsonProperty("description") @Nullable String description,
        @JsonProperty("metadata") @Nullable ImmutableMap<String, String> metadata) {
    return builder()
            .name(name)
            .description(nullToEmpty(description))
            .metadata(ImmutableMap.copyOf(metadata == null ? ImmutableMap.of() : metadata))
            .build();
}
 
开发者ID:oneops,项目名称:secrets-proxy,代码行数:16,代码来源:CreateGroupRequestV2.java

示例15: GenericErrorMessage

import com.fasterxml.jackson.annotation.JsonCreator; //导入依赖的package包/类
@JsonCreator
public GenericErrorMessage(
    @JsonProperty("errorMessage") String errorMessage,
    @JsonProperty("moreInfo") String moreInfo,
    @JsonProperty("stackTrace") String[] stackTrace) {
  this.errorMessage = errorMessage;
  this.moreInfo = moreInfo;
  this.stackTrace = stackTrace;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:10,代码来源:GenericErrorMessage.java


注:本文中的com.fasterxml.jackson.annotation.JsonCreator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。