Java 类org.codehaus.jackson.annotate.JsonCreator 实例源码

项目:jwala    文件:ResourceTemplateMetaData.java   
@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;
}
项目:jira-dvcs-connector    文件:DevSummaryCachePrimingStatus.java   
/**
 * 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);
}
项目:flume-enrichment-interceptor-skeleton    文件:EnrichedEventBodyExtraData.java   
@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;

}
项目:eureka    文件:RelationMixin.java   
@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) {
}
项目:u-qasar.platform    文件:QMMetric.java   
@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);
}
项目:switchyard    文件:ServiceMetrics.java   
@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);
}
项目:switchyard    文件:ComponentServiceMetrics.java   
@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);
}
项目:switchyard    文件:ReferenceMetrics.java   
@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);
}
项目:ocamljava-maven-plugin    文件:DependencyGraph.java   
@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();;
}
项目:visual-scripting    文件:DeviceRobot.java   
@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();
}
项目:stratio-cassandra    文件:FuzzyCondition.java   
/**
 * 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;
}
项目:stratio-cassandra    文件:ColumnMapperBigInteger.java   
/**
 * 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();
}
项目:stratio-cassandra    文件:ColumnMapperString.java   
/**
 * 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;
}
项目:stratio-cassandra    文件:ColumnMapperDate.java   
/**
 * 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);
        }
    };
}
项目:stratio-cassandra    文件:SnowballAnalyzerBuilder.java   
/**
 * 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);
}
项目:jive-sdk-java-jersey    文件:TileRegisterAction.java   
@JsonCreator
public TileRegisterAction(@JsonProperty(PROPERTY_NAME_TEMP_TOKEN) String code,
                           @JsonProperty(PROPERTY_NAME_CONFIG_JSON) Map<String, String> config,
                           @JsonProperty(PROPERTY_NAME_JIVE_PUSH_URL) String jivePushUrl,
                           @JsonProperty(PROPERTY_NAME_JIVE_INSTANCE_URL) String jiveInstanceUrl,
                           @JsonProperty(PROPERTY_NAME_TENANT_ID) String tenantID,
                           @JsonProperty(PROPERTY_NAME_TILE_INSTANCE_ID) String tileInstanceID,
                           @JsonProperty(PROPERTY_NAME_ITEM_TYPE) String itemType,
                           @JsonProperty(PROPERTY_PARENT) String parent,
                           @JsonProperty(PROPERTY_GUID) String guid,
                           @JsonProperty(PROPERTY_PLACE_URI) String placeUri
                           ) {
    this.code = code;
    this.config = config;
    this.tileInstanceID = tileInstanceID;

    this.jivePushUrl = jivePushUrl;
    this.jiveUrl = jiveInstanceUrl;
    this.tenantID = tenantID;

    this.tileDefName = itemType;
    this.itemType = itemType;
    this.parent = parent;
    this.guid = guid;
    this.placeUri = placeUri;
}
项目:jive-sdk-java-jersey    文件:InstanceRegisterAction.java   
@JsonCreator
public InstanceRegisterAction( @JsonProperty(TENANT_ID) String tenantId,
                               @JsonProperty(JIVE_SIGNATURE_URL) String jiveSignatureURL,
                               @JsonProperty(TIMESTAMP) String timestamp,
                               @JsonProperty(JIVE_URL) String jiveUrl,
                               @JsonProperty(JIVE_SIGNATURE) String jiveSignature,
                               @JsonProperty(SCOPE) String scope,
                               @JsonProperty(CODE) String code,
                               @JsonProperty(CLIENT_SECRET) String clientSecret,
                               @JsonProperty(CLIENT_ID) String clientId) {
        this.tenantId = tenantId;
        this.jiveSignatureURL = jiveSignatureURL;
        this.timestamp = timestamp;
        this.jiveUrl = jiveUrl;
        this.jiveSignature = jiveSignature;
        this.scope = scope;
        this.code = code;
        this.clientSecret = clientSecret;
        this.clientId = clientId;
    }
项目:dcs-sdk-java    文件:Alert.java   
@JsonCreator
public Alert(@JsonProperty("token") String token, @JsonProperty("type") SetAlertPayload.AlertType type,
             @JsonProperty("scheduledTime") String scheduledTime) {
    this.token = token;
    this.type = type;
    this.scheduledTime = scheduledTime;
}
项目:jwala    文件:Entity.java   
@JsonCreator
public Entity(@JsonProperty("type") final String type,
              @JsonProperty("group") final String group,
              @JsonProperty("target") final String target,
              @JsonProperty("parentName") final String parentName,
              @JsonProperty("deployToJvms") final Boolean deployToJvms) {
    this.type = type;
    this.group = group;
    this.target = target;
    this.parentName = parentName;
    this.deployToJvms = deployToJvms == null ? true : deployToJvms;
}
项目:dremio-oss    文件:JobTypeStats.java   
@JsonCreator
public JobTypeStats(
    @JsonProperty("type") Types type,
    @JsonProperty("count") int count) {
  this.type = type;
  this.count = count;
}
项目:Mastering-Mesos    文件:TierInfo.java   
@JsonCreator
public TierInfo(
    @JsonProperty("preemptible") boolean preemptible,
    @JsonProperty("revocable") boolean revocable) {

  this.preemptible = preemptible;
  this.revocable = revocable;
}
项目:cassandra-fhir-index    文件:ResourceOptions.java   
@JsonCreator
public ResourceOptions(@JsonProperty("default_analyzer") String analyzer,
        @JsonProperty("resources") Map<String, Set<String>> resources)
        throws InstantiationException, IllegalAccessException, ClassNotFoundException {
    if (analyzer == null) {
        this.defaultAnalyzer = new WhitespaceAnalyzer();
    } else {
        this.defaultAnalyzer = (Analyzer) Class.forName(analyzer).newInstance();
    }

    if (resources != null) {
        this.resources.putAll(resources);
    }
}
项目:ibole-microservice    文件:HostMetadata.java   
/**
 * @param port int
 * @param hostname String
 * @param zone the zone of the server
 * @param useTls boolean
 */
@JsonCreator
public HostMetadata(@JsonProperty("hostname") String hostname,
    @JsonProperty("port") int port, @JsonProperty("zone") String zone, @JsonProperty("useTls") boolean useTls) {
  this.port = port;
  this.hostname = hostname;
  this.zone = zone;
  this.useTls = useTls;
}
项目:drill    文件:JsonTableGroupScan.java   
@JsonCreator
public JsonTableGroupScan(@JsonProperty("userName") final String userName,
                          @JsonProperty("scanSpec") JsonScanSpec scanSpec,
                          @JsonProperty("storage") FileSystemConfig storagePluginConfig,
                          @JsonProperty("format") MapRDBFormatPluginConfig formatPluginConfig,
                          @JsonProperty("columns") List<SchemaPath> columns,
                          @JacksonInject StoragePluginRegistry pluginRegistry) throws IOException, ExecutionSetupException {
  this (userName,
        (FileSystemPlugin) pluginRegistry.getPlugin(storagePluginConfig),
        (MapRDBFormatPlugin) pluginRegistry.getFormatPlugin(storagePluginConfig, formatPluginConfig),
        scanSpec, columns);
}
项目:drill    文件:BinaryTableGroupScan.java   
@JsonCreator
public BinaryTableGroupScan(@JsonProperty("userName") final String userName,
                            @JsonProperty("hbaseScanSpec") HBaseScanSpec scanSpec,
                            @JsonProperty("storage") FileSystemConfig storagePluginConfig,
                            @JsonProperty("format") MapRDBFormatPluginConfig formatPluginConfig,
                            @JsonProperty("columns") List<SchemaPath> columns,
                            @JacksonInject StoragePluginRegistry pluginRegistry) throws IOException, ExecutionSetupException {
  this (userName,
        (FileSystemPlugin) pluginRegistry.getPlugin(storagePluginConfig),
        (MapRDBFormatPlugin) pluginRegistry.getFormatPlugin(storagePluginConfig, formatPluginConfig),
        scanSpec, columns);
}
项目:Camel    文件:MSPTest.java   
@JsonCreator
public static MSPEnum fromValue(String value) {
    for (MSPEnum e : MSPEnum.values()) {
        if (e.value.equals(value)) {
            return e;
        }
    }
    throw new IllegalArgumentException(value);
}
项目:jira-dvcs-connector    文件:ChangesetFileDetail.java   
@JsonCreator
public ChangesetFileDetail(@JsonProperty("fileAction") ChangesetFileAction fileAction, @JsonProperty("file") String file, @JsonProperty("additions") int additions, @JsonProperty("deletions") int deletions)
{
    super(fileAction, file);
    this.additions = additions;
    this.deletions = deletions;
}
项目:jira-dvcs-connector    文件:DevSummaryChangedEvent.java   
@JsonCreator
private static DevSummaryChangedEvent fromJSON(@JsonProperty ("repositoryId") int repositoryId,
        @JsonProperty ("dvcsType") String dvcsType, @JsonProperty ("issueKeys") Set<String> issueKeys,
        @JsonProperty ("date") Date date)
{
    return new DevSummaryChangedEvent(repositoryId, dvcsType, issueKeys, date);
}
项目:flume-enrichment-interceptor-skeleton    文件:EnrichedEventBody.java   
@JsonCreator
public EnrichedEventBody(@JsonProperty("extraData") Map<String, String> extraData,
                         @JsonProperty("message") String message) {
    if (extraData == null) {
        this.extraData = new HashMap<String, String>();
    } else {
        this.extraData = extraData;
    }
    this.message = message;
}
项目:terrapin    文件:FileSetInfo.java   
@JsonCreator
public ServingInfo(@JsonProperty("hdfsPath") String hdfsPath,
                   @JsonProperty("helixResource") String helixResource,
                   @JsonProperty("numPartitions") int numPartitions,
                   @JsonProperty("partitionerType") PartitionerType partitionerType) {
  this.hdfsPath = Preconditions.checkNotNull(hdfsPath);
  this.helixResource = Preconditions.checkNotNull(helixResource);
  this.numPartitions = numPartitions;
  this.partitionerType = partitionerType;
}
项目:samza    文件:UserPageAdClick.java   
@JsonCreator
public UserPageAdClick(
    @JsonProperty("userId") String userId,
    @JsonProperty("pageId") String pageId,
    @JsonProperty("adId") String adId) {
  this.userId = userId;
  this.pageId = pageId;
  this.adId = adId;
}
项目:samza    文件:TestTableData.java   
@JsonCreator
public EnrichedPageView(
    @JsonProperty("pageKey") String pageKey,
    @JsonProperty("memberId") int memberId,
    @JsonProperty("company") String company) {
  super(pageKey, memberId);
  this.company = company;
}
项目:openhab-hdl    文件:Structure.java   
@JsonCreator
public static AwayState forValue(String v) {
    for (AwayState s : AwayState.values()) {
        if (s.state.equals(v)) {
            return s;
        }
    }
    throw new IllegalArgumentException("Invalid state: " + v);
}
项目:openhab-hdl    文件:Thermostat.java   
@JsonCreator
public static HvacMode forValue(String v) {
    for (HvacMode hm : HvacMode.values()) {
        if (hm.mode.equals(v)) {
            return hm;
        }
    }
    throw new IllegalArgumentException("Invalid hvac_mode: " + v);
}
项目:openhab-hdl    文件:Thermostat.java   
@JsonCreator
public static HvacState forValue(String v) {
    for (HvacState hs : HvacState.values()) {
        if (hs.state.equals(v)) {
            return hs;
        }
    }
    throw new IllegalArgumentException("Invalid hvac_state: " + v);
}
项目:openhab-hdl    文件:SmokeCOAlarm.java   
@JsonCreator
public static BatteryHealth forValue(String v) {
    for (BatteryHealth bs : BatteryHealth.values()) {
        if (bs.state.equals(v)) {
            return bs;
        }
    }
    throw new IllegalArgumentException("Invalid battery_state: " + v);
}
项目:openhab-hdl    文件:SmokeCOAlarm.java   
@JsonCreator
public static AlarmState forValue(String v) {
    for (AlarmState as : AlarmState.values()) {
        if (as.state.equals(v)) {
            return as;
        }
    }
    throw new IllegalArgumentException("Invalid alarm_state: " + v);
}
项目:openhab-hdl    文件:SmokeCOAlarm.java   
@JsonCreator
public static ColorState forValue(String v) {
    for (ColorState cs : ColorState.values()) {
        if (cs.state.equals(v)) {
            return cs;
        }
    }
    throw new IllegalArgumentException("Invalid color_state: " + v);
}
项目:openhab-hdl    文件:Selection.java   
@JsonCreator
public static SelectionType forValue(String v) {
    for (SelectionType st : SelectionType.values()) {
        if (st.type.equals(v)) {
            return st;
        }
    }
    throw new IllegalArgumentException("Invalid selection type: " + v);
}
项目:openhab-hdl    文件:Thermostat.java   
@JsonCreator
public static HvacMode forValue(String v) {
    for (HvacMode hm : HvacMode.values()) {
        if (hm.mode.equals(v)) {
            return hm;
        }
    }
    throw new IllegalArgumentException("Invalid hvacMode: " + v);
}