Examples of findProperties()


Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

    SerializationConfig serializationConfig = mapper.getSerializationConfig();
    JavaType javaType = serializationConfig.constructType(type);
    BeanDescription description = serializationConfig.introspect(javaType);

    this.definitions = description.findProperties();
  }

  /**
   * Returns the {@link BeanPropertyDefinition} for the given {@link PersistentProperty}.
   *
 
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

    }

    BeanDescription description = introspector.forDeserialization(mapper.getDeserializationConfig(),
        mapper.constructType(object.getClass()), mapper.getDeserializationConfig());

    for (BeanPropertyDefinition definition : description.findProperties()) {
      if (definition.getName().equals(fieldName)) {
        return entity.getPersistentProperty(definition.getInternalName());
      }
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

    public void testIntermediateMixin() {
        objectMapper.addMixInAnnotations( BaseClass.class, MixIn.class );

        JavaType type = objectMapper.getTypeFactory().constructType( LeafClass.class );
        BeanDescription desc = objectMapper.getSerializationConfig().introspect( type );
        List<BeanPropertyDefinition> props = desc.findProperties();

        MixinSerForMethodsTester.INSTANCE.testIntermediateMixin( createWriter( LeafClass.class ) );
    }

    @Test
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

        ObjectCodec objectCodec = jp.getCodec();
        if (objectCodec instanceof ObjectMapper) {
            ObjectMapper objectMapper = (ObjectMapper) objectCodec;
            BeanDescription beanDescription =
                    objectMapper.getSerializationConfig().introspect(ctxt.constructType(beanOrClass.getClass()));
            for (BeanPropertyDefinition propertyDefinition : beanDescription.findProperties()) {
                if (propertyName.equals(propertyDefinition.getName())) {
                    jp.skipChildren();
                    return true;
                }
            }
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

  public Iterable<? extends ModelProperty> propertiesForSerialization(ResolvedType resolvedType) {
    List<ModelProperty> serializationCandidates = newArrayList();
    SerializationConfig serializationConfig = objectMapper.getSerializationConfig();
    BeanDescription beanDescription = serializationConfig.introspect(TypeFactory.defaultInstance()
            .constructType(resolvedType.getErasedType()));
    Map<String, BeanPropertyDefinition> propertyLookup = Maps.uniqueIndex(beanDescription.findProperties(),
            BeanPropertyDefinitions.beanPropertyByInternalName());

    for (ResolvedField childField : fieldProvider.in(resolvedType)) {
      if (propertyLookup.containsKey(childField.getName())) {
        BeanPropertyDefinition propertyDefinition = propertyLookup.get(childField.getName());
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

  public Iterable<? extends ModelProperty> propertiesForDeserialization(ResolvedType resolvedType) {
    List<ModelProperty> serializationCandidates = newArrayList();
    DeserializationConfig serializationConfig = objectMapper.getDeserializationConfig();
    BeanDescription beanDescription = serializationConfig.introspect(TypeFactory.defaultInstance()
            .constructType(resolvedType.getErasedType()));
    Map<String, BeanPropertyDefinition> propertyLookup = uniqueIndex(beanDescription.findProperties(),
            BeanPropertyDefinitions.beanPropertyByInternalName());
    for (ResolvedField childField : fieldProvider.in(resolvedType)) {
      if (propertyLookup.containsKey(childField.getName())) {
        BeanPropertyDefinition propertyDefinition = propertyLookup.get(childField.getName());
        Optional<BeanPropertyDefinition> jacksonProperty
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

  public Iterable<? extends ModelProperty> propertiesForSerialization(ResolvedType resolvedType) {
    List<ModelProperty> serializationCandidates = newArrayList();
    SerializationConfig serializationConfig = objectMapper.getSerializationConfig();
    BeanDescription beanDescription = serializationConfig.introspect(TypeFactory.defaultInstance()
            .constructType(resolvedType.getErasedType()));
    Map<String, BeanPropertyDefinition> propertyLookup = uniqueIndex(beanDescription.findProperties(),
            BeanPropertyDefinitions.beanPropertyByInternalName());
    for (ResolvedMethod childProperty : accessors.in(resolvedType)) {
      if (propertyLookup.containsKey(propertyName(childProperty.getName()))) {
        BeanPropertyDefinition propertyDefinition = propertyLookup.get(propertyName(childProperty.getName()));
        Optional<BeanPropertyDefinition> jacksonProperty
View Full Code Here

Examples of com.fasterxml.jackson.databind.BeanDescription.findProperties()

  public Iterable<? extends ModelProperty> propertiesForDeserialization(ResolvedType resolvedType) {
    List<ModelProperty> serializationCandidates = newArrayList();
    DeserializationConfig serializationConfig = objectMapper.getDeserializationConfig();
    BeanDescription beanDescription = serializationConfig.introspect(TypeFactory.defaultInstance()
            .constructType(resolvedType.getErasedType()));
    Map<String, BeanPropertyDefinition> propertyLookup = uniqueIndex(beanDescription.findProperties(),
            BeanPropertyDefinitions.beanPropertyByInternalName());
    for (ResolvedMethod childProperty : accessors.in(resolvedType)) {

      if (propertyLookup.containsKey(propertyName(childProperty.getName()))) {
        BeanPropertyDefinition propertyDefinition = propertyLookup.get(propertyName(childProperty.getName()));
View Full Code Here

Examples of com.opensymphony.xwork2.util.finder.ResourceFinder.findProperties()

    }

    protected Properties getProperties(String fileName) {
        ResourceFinder finder = new ResourceFinder("");
        try {
            return finder.findProperties(fileName);
        } catch (IOException e) {
            if (LOG.isErrorEnabled()) {
                LOG.error("Unable to read property file [#]", fileName);
            }
            return new Properties();
View Full Code Here

Examples of com.opensymphony.xwork2.util.finder.ResourceFinder.findProperties()

    }

    protected Properties getProperties(String fileName) {
        ResourceFinder finder = new ResourceFinder("");
        try {
            return finder.findProperties(fileName);
        } catch (IOException e) {
            if (LOG.isErrorEnabled())
                LOG.error("Unable to read property file [#]", fileName);
            return new Properties();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.