@Override public final String getName() { return _propName.getSimpleName(); }
@Override public String getName() { return (_name == null) ? null : _name.getSimpleName(); }
@Override public String getName() { return _name.getSimpleName(); } @Override public PropertyName getFullName() { return _name; }
@Override public String getInternalName() { return _internalName.getSimpleName(); }
@Override public String getName() { return _fullName.getSimpleName(); }
/** * @deprecated Since 2.6 use {@link #getFullRootName} instead. */ @Deprecated // since 2.6 public final String getRootName() { return (_rootName == null) ? null : _rootName.getSimpleName(); }
public SettableBeanProperty removeProperty(PropertyName name) { return _properties.remove(name.getSimpleName()); }
public SettableBeanProperty findProperty(PropertyName propertyName) { return _properties.get(propertyName.getSimpleName()); }
protected POJOPropertyBuilder _property(Map<String, POJOPropertyBuilder> props, PropertyName name) { String simpleName = name.getSimpleName(); POJOPropertyBuilder prop = props.get(simpleName); if (prop == null) { prop = new POJOPropertyBuilder(_config, _annotationIntrospector, _forSerialization, name); props.put(simpleName, prop); } return prop; }
public SettableBeanProperty findProperty(PropertyName propertyName) { // TODO: start matching full name? return findProperty(propertyName.getSimpleName()); }
@Override public String findImplicitPropertyName(AnnotatedMember m) { PropertyName n = _findConstructorName(m); return (n == null) ? null : n.getSimpleName(); }
/** * Helper method called to see if given non-creator property is the "id property"; * and if so, handle appropriately. * * @since 2.1 */ public boolean readIdProperty(String propName) throws IOException { if ((_objectIdReader != null) && propName.equals(_objectIdReader.propertyName.getSimpleName())) { _idValue = _objectIdReader.readObjectReference(_parser, _context); return true; } return false; }
private Map<String,String> _buildAliasMapping(Map<String,List<PropertyName>> defs) { if ((defs == null) || defs.isEmpty()) { return Collections.emptyMap(); } Map<String,String> aliases = new HashMap<>(); for (Map.Entry<String,List<PropertyName>> entry : defs.entrySet()) { String key = entry.getKey(); if (_caseInsensitive) { key = key.toLowerCase(); } for (PropertyName pn : entry.getValue()) { String mapped = pn.getSimpleName(); if (_caseInsensitive) { mapped = mapped.toLowerCase(); } aliases.put(mapped, key); } } return aliases; } }
_name = new SerializedString(name.getSimpleName()); _wrapperName = base._wrapperName;
/** * Factory method called by {@link com.fasterxml.jackson.databind.ser.std.BeanSerializerBase} * with the initial information based on standard settings for the type * for which serializer is being built. * * @since 2.3 */ public static ObjectIdWriter construct(JavaType idType, PropertyName propName, ObjectIdGenerator<?> generator, boolean alwaysAsId) { String simpleName = (propName == null) ? null : propName.getSimpleName(); SerializableString serName = (simpleName == null) ? null : new SerializedString(simpleName); return new ObjectIdWriter(idType, serName, generator, null, alwaysAsId); }
String expSimpleName = expRootName.getSimpleName(); if (p.getCurrentToken() != JsonToken.START_OBJECT) { ctxt.reportWrongTokenException(rootType, JsonToken.START_OBJECT,
String expSimpleName = expRootName.getSimpleName();
if (!aliases.isEmpty()) { for (PropertyName pn : aliases) { _propertyLookup.put(pn.getSimpleName(), prop);
protected String _findTypeName(JavaType type, BeanDescription beanDesc) { // First, handle container types; they require recursion if (type.isArrayType()) { return "Array"; } if (type.isMapLikeType() && ReflectionUtils.isSystemType(type)) { return "Map"; } if (type.isContainerType() && ReflectionUtils.isSystemType(type)) { if (Set.class.isAssignableFrom(type.getRawClass())) { return "Set"; } return "List"; } if (beanDesc == null) { beanDesc = _mapper.getSerializationConfig().introspectClassAnnotations(type); } PropertyName rootName = _intr.findRootName(beanDesc.getClassInfo()); if (rootName != null && rootName.hasSimpleName()) { return rootName.getSimpleName(); } return _typeNameResolver.nameForType(type); }
protected BeanPropertyWriter _constructVirtualProperty(JsonAppend.Prop prop, MapperConfig<?> config, AnnotatedClass ac) { PropertyMetadata metadata = prop.required() ? PropertyMetadata.STD_REQUIRED : PropertyMetadata.STD_OPTIONAL; PropertyName propName = _propertyName(prop.name(), prop.namespace()); JavaType type = config.constructType(prop.type()); // now, then, we need a placeholder for member (no real Field/Method): AnnotatedMember member = new VirtualAnnotatedMember(ac, ac.getRawType(), propName.getSimpleName(), type); // and with that and property definition SimpleBeanPropertyDefinition propDef = SimpleBeanPropertyDefinition.construct(config, member, propName, metadata, prop.include()); Class<?> implClass = prop.value(); HandlerInstantiator hi = config.getHandlerInstantiator(); VirtualBeanPropertyWriter bpw = (hi == null) ? null : hi.virtualPropertyWriterInstance(config, implClass); if (bpw == null) { bpw = (VirtualBeanPropertyWriter) ClassUtil.createInstance(implClass, config.canOverrideAccessModifiers()); } // one more thing: give it necessary contextual information return bpw.withConfig(config, ac, propDef, type); }