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


Java JsonCreator类代码示例

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


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

示例1: ResourceTemplateMetaData

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public ResourceTemplateMetaData(@JsonProperty("templateName") final String templateName,
                                @JsonProperty("contentType") final MediaType contentType,
                                @JsonProperty("deployFileName") final String deployFileName,
                                @JsonProperty("deployPath") final String deployPath,
                                @JsonProperty("entity") final Entity entity,
                                @JsonProperty("unpack") final Boolean unpack,
                                @JsonProperty("overwrite") Boolean overwrite,
                                @JsonProperty("hotDeploy") Boolean hotDeploy) {
    this.templateName = templateName;
    this.contentType = contentType;
    this.deployFileName = deployFileName;
    this.deployPath = deployPath;
    this.entity = entity;
    this.unpack = unpack == null ? false : unpack;
    this.overwrite = overwrite == null ? true : overwrite;
    this.hotDeploy = hotDeploy == null ? false : hotDeploy;
}
 
开发者ID:cerner,项目名称:jwala,代码行数:19,代码来源:ResourceTemplateMetaData.java

示例2: this

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
/**
 * Constructor for deserialisation from JSON (for example in the unit test).
 *
 * @param inProgress whether indexing is in progress
 * @param issueKeyCount the number of issues keys fetched so far
 * @param totalIssueKeyCount the total number of issues keys to fetch
 * @param pullRequestCount the number of pull requests fetched so far
 * @param totalPullRequestCount the total number of pull requests to fetch
 * @param exception any exception that occurred during reindexing
 * @param stopped whether the user has stopped the reindexing
 */
@JsonCreator
DevSummaryCachePrimingStatus(
        @JsonProperty ("inProgress") final boolean inProgress,
        @JsonProperty ("issueKeyCount") final int issueKeyCount,
        @JsonProperty ("totalIssueKeyCount") final int totalIssueKeyCount,
        @JsonProperty ("pullRequestCount") final int pullRequestCount,
        @JsonProperty ("totalPullRequestCount") final int totalPullRequestCount,
        @JsonProperty ("error") final Exception exception,
        @JsonProperty ("stopped") final boolean stopped,
        @JsonProperty ("timeTaken") final String timeTaken)
{
    this();
    this.exception.set(exception);
    this.inProgress.set(inProgress);
    this.stopped.set(stopped);
    this.issueKeyCount.set(issueKeyCount);
    this.totalIssueKeyCount.set(totalIssueKeyCount);
    this.pullRequestCount.set(pullRequestCount);
    this.totalPullRequestCount.set(totalPullRequestCount);
    this.timeTaken.set(timeTaken);
}
 
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:33,代码来源:DevSummaryCachePrimingStatus.java

示例3: EnrichedEventBodyExtraData

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public EnrichedEventBodyExtraData(@JsonProperty("topic") String topic,
                                 @JsonProperty("timestamp") String timestamp,
                                 @JsonProperty("sha1Hex") String sha1Hex,
                                 @JsonProperty("filePath") String filePath,
                                 @JsonProperty("fileName") String fileName,
                                 @JsonProperty("lineNumber") String lineNumber,
                                 @JsonProperty("type") String type) {

    this.topic = topic;
    this.timestamp = timestamp;
    this.sha1Hex = sha1Hex;
    this.filePath = filePath;
    this.fileName = fileName;
    this.lineNumber = lineNumber;
    this.type = type;

}
 
开发者ID:keedio,项目名称:flume-enrichment-interceptor-skeleton,代码行数:19,代码来源:EnrichedEventBodyExtraData.java

示例4: RelationMixin

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public RelationMixin(
        @JsonProperty("minDistanceBetweenStarts") Integer minDistanceBetweenStarts,
        @JsonProperty("minDistanceBetweenStartsUnits") Unit minDistanceBetweenStartsUnits,
        @JsonProperty("maxDistanceBetweenStarts") Integer maxDistanceBetweenStarts,
        @JsonProperty("maxDistanceBetweenStartsUnits") Unit maxDistanceBetweenStartsUnits,
        @JsonProperty("minSpan") Integer minSpan,
        @JsonProperty("minSpanUnits") Unit minSpanUnits,
        @JsonProperty("maxSpan") Integer maxSpan,
        @JsonProperty("maxSpanUnits") Unit maxSpanUnits,
        @JsonProperty("minDistanceBetween") Integer minDistanceBetween,
        @JsonProperty("minDistanceBetweenUnits") Unit minDistanceBetweenUnits,
        @JsonProperty("maxDistanceBetween") Integer maxDistanceBetween,
        @JsonProperty("maxDistanceBetweenUnits") Unit maxDistanceBetweenUnits,
        @JsonProperty("minDistanceBetweenFinishes") Integer minDistanceBetweenFinishes,
        @JsonProperty("minDistanceBetweenFinishesUnits") Unit minDistanceBetweenFinishesUnits,
        @JsonProperty("maxDistanceBetweenFinishes") Integer maxDistanceBetweenFinishes,
        @JsonProperty("maxDistanceBetweenFinishesUnits") Unit maxDistanceBetweenFinishesUnits) {
}
 
开发者ID:eurekaclinical,项目名称:eureka,代码行数:20,代码来源:RelationMixin.java

示例5: QMMetric

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public QMMetric(
		@JsonProperty("name") final String name,
		@JsonProperty("children") final List<QMMetric> children,
		@JsonProperty("description") final String description,
		@JsonProperty("lowerLimit") final float lowerLimit,
		@JsonProperty("scale") final Scale scale,
		@JsonProperty("source") final MetricSource source,
		@JsonProperty("targetValue") final float targetValue,
		@JsonProperty("unit") final Unit unit,
		@JsonProperty("upperLimit") final float upperLimit,
		@JsonProperty("weight") final float weight) {
	
	this.setName(name);
	this.setDescription(description);
	this.setCompleted(true);
	this.setLowerLimit((double) lowerLimit);
	this.setScale(scale);
	this.setSource(source);
	this.setTargetValue(targetValue);
	this.setUnit(unit);
	this.setUpperLimit((double) upperLimit);
	this.setWeight(weight);
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:25,代码来源:QMMetric.java

示例6: ServiceMetrics

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public ServiceMetrics(@JsonProperty("name") String name,
        @JsonProperty("application") String application,
        @JsonProperty("successCount") int successCount,
        @JsonProperty("faultCount") int faultCount,
        @JsonProperty("totalCount") int totalCount,
        @JsonProperty("averageTime") double averageTime,
        @JsonProperty("minTime") long minTime,
        @JsonProperty("maxTime") long maxTime,
        @JsonProperty("totalTime") long totalTime,
        @JsonProperty("operations") OperationMetrics[] operations,
        @JsonProperty("gateways") GatewayMetrics[] gateways) {
    super(successCount, faultCount, totalCount, averageTime, minTime, maxTime, totalTime);
    this.name = name;
    this.application = application;
    this.operationMetrics = ModelUtil.createNamedMetricMap(operations);
    this.gatewayMetrics = ModelUtil.createNamedMetricMap(gateways);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:19,代码来源:ServiceMetrics.java

示例7: ComponentServiceMetrics

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public ComponentServiceMetrics(@JsonProperty("name") String name,
        @JsonProperty("application") String application,
        @JsonProperty("successCount") int successCount,
        @JsonProperty("faultCount") int faultCount,
        @JsonProperty("totalCount") int totalCount,
        @JsonProperty("averageTime") double averageTime,
        @JsonProperty("minTime") long minTime,
        @JsonProperty("maxTime") long maxTime,
        @JsonProperty("totalTime") long totalTime,
        @JsonProperty("operations") OperationMetrics[] operations,
        @JsonProperty("references") ComponentReferenceMetrics[] references) {
    super(successCount, faultCount, totalCount, averageTime, minTime, maxTime, totalTime);
    this.name = name;
    this.application = application;
    this.operationMetrics = ModelUtil.createNamedMetricMap(operations);
    this.componentReferenceMetrics = ModelUtil.createNamedMetricMap(references);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:19,代码来源:ComponentServiceMetrics.java

示例8: ReferenceMetrics

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public ReferenceMetrics(@JsonProperty("name") String name,
        @JsonProperty("application") String application,
        @JsonProperty("successCount") int successCount,
        @JsonProperty("faultCount") int faultCount,
        @JsonProperty("totalCount") int totalCount,
        @JsonProperty("averageTime") double averageTime,
        @JsonProperty("minTime") long minTime,
        @JsonProperty("maxTime") long maxTime,
        @JsonProperty("totalTime") long totalTime,
        @JsonProperty("operations") OperationMetrics[] operations,
        @JsonProperty("gateways") GatewayMetrics[] gateways) {
    super(successCount, faultCount, totalCount, averageTime, minTime, maxTime, totalTime);
    this.name = name;
    this.application = application;
    this.operationMetrics = ModelUtil.createNamedMetricMap(operations);
    this.gatewayMetrics = ModelUtil.createNamedMetricMap(gateways);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:19,代码来源:ReferenceMetrics.java

示例9: DependencyGraph

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public DependencyGraph(final @JsonProperty(DEPENDENCIES_PROPERTY) Map<String, Collection<ModuleDescriptor>> dependencies
) {
	final Set<Entry<String, Collection<ModuleDescriptor>>> entrySet = Preconditions.checkNotNull(dependencies).entrySet();
	final ImmutableMultimap.Builder<String, ModuleDescriptor> builder = ImmutableMultimap.builder();
	
	for (final Entry<String, Collection<ModuleDescriptor>> entry : entrySet) {
		final Collection<ModuleDescriptor> values = entry.getValue();
		for (final ModuleDescriptor moduleDescriptor : values) {
			Preconditions.checkState(moduleDescriptor instanceof ModuleDescriptor);
			builder.put(entry.getKey(), moduleDescriptor);
		}
	}

	this.dependencies = builder.build().asMap();;
}
 
开发者ID:struktured,项目名称:ocamljava-maven-plugin,代码行数:17,代码来源:DependencyGraph.java

示例10: TestResult

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
@JsonCreator
public TestResult(
		@JsonProperty("testClass") String testClass, 
		@JsonProperty("testMethod") String testMethod, 
		@JsonProperty("status") Status status,
		@JsonProperty("startTime") long startTime,
		@JsonProperty("duration") long duration,
		@JsonProperty("stackTrace") String stackTrace)
{
	this.testClass = testClass;
	this.testMethod = testMethod;
	this.status = status;
	this.startTime = startTime;
	this.duration = duration;
	this.stackTrace = stackTrace;
	this.screenshots = Lists.newLinkedList();
}
 
开发者ID:testobject,项目名称:visual-scripting,代码行数:18,代码来源:DeviceRobot.java

示例11: FuzzyCondition

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
/**
 * Returns a new {@link FuzzyCondition}.
 *
 * @param boost          The boost for this query clause. Documents matching this clause will (in addition to the
 *                       normal weightings) have their score multiplied by {@code boost}. If {@code null}, then
 *                       {@link #DEFAULT_BOOST} is used as default.
 * @param field          The field name.
 * @param value          The field fuzzy value.
 * @param maxEdits       Must be >= 0 and <= {@link LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE}.
 * @param prefixLength   Length of common (non-fuzzy) prefix
 * @param maxExpansions  The maximum number of terms to match. If this number is greater than {@link
 *                       BooleanQuery#getMaxClauseCount} when the query is rewritten, then the maxClauseCount will
 *                       be used instead.
 * @param transpositions True if transpositions should be treated as a primitive edit operation. If this is false,
 *                       comparisons will implement the classic Levenshtein algorithm.
 */
@JsonCreator
public FuzzyCondition(@JsonProperty("boost") Float boost,
                      @JsonProperty("field") String field,
                      @JsonProperty("value") String value,
                      @JsonProperty("max_edits") Integer maxEdits,
                      @JsonProperty("prefix_length") Integer prefixLength,
                      @JsonProperty("max_expansions") Integer maxExpansions,
                      @JsonProperty("transpositions") Boolean transpositions) {
    super(boost);

    this.field = field;
    this.value = value;
    this.maxEdits = maxEdits == null ? DEFAULT_MAX_EDITS : maxEdits;
    this.prefixLength = prefixLength == null ? DEFAULT_PREFIX_LENGTH : prefixLength;
    this.maxExpansions = maxExpansions == null ? DEFAULT_MAX_EXPANSIONS : maxExpansions;
    this.transpositions = transpositions == null ? DEFAULT_TRANSPOSITIONS : transpositions;
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:34,代码来源:FuzzyCondition.java

示例12: ColumnMapperBigInteger

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
/**
 * Builds a new {@link ColumnMapperBigDecimal} using the specified max number of digits.
 *
 * @param digits The max number of digits. If {@code null}, the {@link #DEFAULT_DIGITS} will be used.
 */
@JsonCreator
public ColumnMapperBigInteger(@JsonProperty("digits") Integer digits) {
    super(new AbstractType<?>[]{AsciiType.instance,
                                UTF8Type.instance,
                                Int32Type.instance,
                                LongType.instance,
                                IntegerType.instance}, new AbstractType[]{});

    if (digits != null && digits <= 0) {
        throw new IllegalArgumentException("Positive digits required");
    }

    this.digits = digits == null ? DEFAULT_DIGITS : digits;
    complement = BigInteger.valueOf(10).pow(this.digits).subtract(BigInteger.valueOf(1));
    BigInteger maxValue = complement.multiply(BigInteger.valueOf(2));
    hexDigits = encode(maxValue).length();
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:23,代码来源:ColumnMapperBigInteger.java

示例13: ColumnMapperString

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
/**
 * Builds a new {@link ColumnMapperString}.
 *
 * @param caseSensitive If the getAnalyzer must be case sensitive.
 */
@JsonCreator
public ColumnMapperString(@JsonProperty("case_sensitive") Boolean caseSensitive) {
    super(new AbstractType<?>[]{AsciiType.instance,
                                UTF8Type.instance,
                                Int32Type.instance,
                                LongType.instance,
                                IntegerType.instance,
                                FloatType.instance,
                                DoubleType.instance,
                                BooleanType.instance,
                                UUIDType.instance,
                                TimeUUIDType.instance,
                                TimestampType.instance,
                                BytesType.instance,
                                InetAddressType.instance}, new AbstractType[]{UTF8Type.instance});
    this.caseSensitive = caseSensitive == null ? DEFAULT_CASE_SENSITIVE : caseSensitive;
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:23,代码来源:ColumnMapperString.java

示例14: ColumnMapperDate

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
/**
 * Builds a new {@link ColumnMapperDate} using the specified pattern.
 *
 * @param pattern The {@link SimpleDateFormat} pattern to be used.
 */
@JsonCreator
public ColumnMapperDate(@JsonProperty("pattern") String pattern) {
    super(new AbstractType<?>[]{AsciiType.instance,
                                UTF8Type.instance,
                                Int32Type.instance,
                                LongType.instance,
                                IntegerType.instance,
                                FloatType.instance,
                                DoubleType.instance,
                                DecimalType.instance,
                                TimestampType.instance},
          new AbstractType[]{LongType.instance, TimestampType.instance});
    this.pattern = pattern == null ? DEFAULT_PATTERN : pattern;
    concurrentDateFormat = new ThreadLocal<DateFormat>() {
        @Override
        protected DateFormat initialValue() {
            return new SimpleDateFormat(ColumnMapperDate.this.pattern);
        }
    };
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:26,代码来源:ColumnMapperDate.java

示例15: SnowballAnalyzerBuilder

import org.codehaus.jackson.annotate.JsonCreator; //导入依赖的package包/类
/**
 * Builds a new {@link SnowballAnalyzerBuilder} for the specified language and stopwords.
 *
 * @param language  The language. The supported languages are English, French, Spanish, Portuguese, Italian,
 *                  Romanian, German, Dutch, Swedish, Norwegian, Danish, Russian, Finnish, Irish, Hungarian,
 *                  Turkish, Armenian, Basque and Catalan.
 * @param stopwords The comma separated stopwords {@code String}.
 */
@JsonCreator
public SnowballAnalyzerBuilder(@JsonProperty("language") final String language,
                               @JsonProperty("stopwords") String stopwords) {

    // Check language
    if (language == null || language.trim().isEmpty()) {
        throw new IllegalArgumentException("Language must be specified");
    }

    // Setup stopwords
    CharArraySet stops = stopwords == null ? getDefaultStopwords(language) : getStopwords(stopwords);

    // Setup analyzer
    this.analyzer = buildAnalyzer(language, stops);

    // Force analysis validation
    AnalysisUtils.analyzeAsText("test", analyzer);
}
 
开发者ID:Stratio,项目名称:stratio-cassandra,代码行数:27,代码来源:SnowballAnalyzerBuilder.java


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