當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。