Java 类com.fasterxml.jackson.databind.node.ShortNode 实例源码

项目:athena    文件:UiExtensionManager.java   
@Activate
public void activate() {
    Serializer serializer = Serializer.using(KryoNamespaces.API,
                    ObjectNode.class, ArrayNode.class,
                    JsonNodeFactory.class, LinkedHashMap.class,
                    TextNode.class, BooleanNode.class,
                    LongNode.class, DoubleNode.class, ShortNode.class,
                    IntNode.class, NullNode.class);

    prefsConsistentMap = storageService.<String, ObjectNode>consistentMapBuilder()
            .withName(ONOS_USER_PREFERENCES)
            .withSerializer(serializer)
            .withRelaxedReadConsistency()
            .build();
    prefsConsistentMap.addListener(prefsListener);
    prefs = prefsConsistentMap.asJavaMap();
    register(core);
    log.info("Started");
}
项目:athena    文件:DistributedNetworkConfigStore.java   
@Activate
public void activate() {
    KryoNamespace.Builder kryoBuilder = new KryoNamespace.Builder()
            .register(KryoNamespaces.API)
            .register(ConfigKey.class, ObjectNode.class, ArrayNode.class,
                      JsonNodeFactory.class, LinkedHashMap.class,
                      TextNode.class, BooleanNode.class,
                      LongNode.class, DoubleNode.class, ShortNode.class, IntNode.class,
                      NullNode.class);

    configs = storageService.<ConfigKey, JsonNode>consistentMapBuilder()
            .withSerializer(Serializer.using(kryoBuilder.build()))
            .withName("onos-network-configs")
            .withRelaxedReadConsistency()
            .build();
    configs.addListener(listener);
    log.info("Started");
}
项目:onos    文件:DistributedNetworkConfigStore.java   
@Activate
public void activate() {
    KryoNamespace.Builder kryoBuilder = new KryoNamespace.Builder()
            .register(KryoNamespaces.API)
            .register(ConfigKey.class, ObjectNode.class, ArrayNode.class,
                      JsonNodeFactory.class, LinkedHashMap.class,
                      TextNode.class, BooleanNode.class,
                      LongNode.class, DoubleNode.class, ShortNode.class, IntNode.class,
                      NullNode.class);

    configs = storageService.<ConfigKey, JsonNode>consistentMapBuilder()
            .withSerializer(Serializer.using(kryoBuilder.build()))
            .withName("onos-network-configs")
            .withRelaxedReadConsistency()
            .build();
    configs.addListener(listener);
    log.info("Started");
}
项目:unravl    文件:Json.java   
public static Object unwrap(Object val) { // Can Jackson do this via
                                          // ObjectMapper.treeToValue()? The
                                          // spec is unclear
    Object result = val;
    ObjectMapper mapper = new ObjectMapper();
    if (val instanceof ObjectNode) {
        result = mapper.convertValue((ObjectNode) val, Map.class);
    } else if (val instanceof ArrayNode) {
        result = mapper.convertValue((ObjectNode) val, List.class);
    } else if (val instanceof NullNode) {
        result = null;
    } else if (val instanceof BooleanNode) {
        result = ((BooleanNode) val).booleanValue();
    } else if (val instanceof ShortNode) {
        result = ((ShortNode) val).shortValue();
    } else if (val instanceof IntNode) {
        result = ((IntNode) val).intValue();
    } else if (val instanceof LongNode) {
        result = ((LongNode) val).longValue();
    } else if (val instanceof DoubleNode) {
        result = ((DoubleNode) val).doubleValue();
    } else if (val instanceof FloatNode) {
        result = ((FloatNode) val).floatValue();
    } else if (val instanceof BigIntegerNode) {
        result = ((BigIntegerNode) val).bigIntegerValue();
    } else if (val instanceof DecimalNode) {
        result = ((DecimalNode) val).decimalValue();
    }
    return result;
}
项目:onos    文件:UiExtensionManager.java   
@Activate
public void activate() {
    Serializer serializer = Serializer.using(KryoNamespaces.API,
                 ObjectNode.class, ArrayNode.class,
                 JsonNodeFactory.class, LinkedHashMap.class,
                 TextNode.class, BooleanNode.class,
                 LongNode.class, DoubleNode.class, ShortNode.class,
                 IntNode.class, NullNode.class, UiSessionToken.class);

    prefsConsistentMap = storageService.<String, ObjectNode>consistentMapBuilder()
            .withName(ONOS_USER_PREFERENCES)
            .withSerializer(serializer)
            .withRelaxedReadConsistency()
            .build();
    prefsConsistentMap.addListener(prefsListener);
    prefs = prefsConsistentMap.asJavaMap();

    tokensConsistentMap = storageService.<UiSessionToken, String>consistentMapBuilder()
            .withName(ONOS_SESSION_TOKENS)
            .withSerializer(serializer)
            .withRelaxedReadConsistency()
            .build();
    tokens = tokensConsistentMap.asJavaMap();

    register(core);

    log.info("Started");
}
项目:openapi-parser    文件:IntegerValidator.java   
public void IntegerValidator() {
    intTypes.add(IntNode.class);
    intTypes.add(ShortNode.class);
    intTypes.add(BigIntegerNode.class);
}