/** * Fluent factory method for constructing an instance with different * simple name. */ public PropertyName withSimpleName(String simpleName) { if (simpleName == null) { simpleName = ""; } if (simpleName.equals(_simpleName)) { return this; } return new PropertyName(simpleName, _namespace); }
/** * Fluent factory method for constructing an instance with different * namespace. */ public PropertyName withNamespace(String ns) { if (ns == null) { if (_namespace == null) { return this; } } else if (ns.equals(_namespace)) { return this; } return new PropertyName(_simpleName, ns); }
public PropertyName internSimpleName() { if (_simpleName.length() == 0) { // empty String is canonical already return this; } String interned = InternCache.instance.intern(_simpleName); if (interned == _simpleName) { // was already interned return this; } return new PropertyName(interned, _namespace); }
/** * @since 2.6 */ public static PropertyName construct(String simpleName) { if (simpleName == null || simpleName.length() == 0) { return USE_DEFAULT; } return new PropertyName(InternCache.instance.intern(simpleName), null); }
@Override public PropertyName getFullName() { return new PropertyName(getName()); }
public static PropertyName construct(String simpleName, String ns) { if (simpleName == null) { simpleName = ""; } if (ns == null && simpleName.length() == 0) { return USE_DEFAULT; } return new PropertyName(InternCache.instance.intern(simpleName), ns); }
@Override public PropertyName getFullName() { // !!! TODO: impl properly return new PropertyName(_name.getValue()); }
@Override public BeanPropertyDefinition withSimpleName(String newName) { if (_fullName.hasSimpleName(newName) && !_fullName.hasNamespace()) { return this; } return new SimpleBeanPropertyDefinition(_annotationIntrospector, _member, new PropertyName(newName), _metadata, _inclusion); }
JsonFormatVisitable, SchemaAware protected final static PropertyName NAME_FOR_OBJECT_REF = new PropertyName("#object-ref");
/** * @since 2.3 */ public SettableBeanProperty withSimpleName(String simpleName) { PropertyName n = (_propName == null) ? new PropertyName(simpleName) : _propName.withSimpleName(simpleName); return (n == _propName) ? this : withName(n); }
private PropertyName getMappedName(Annotated annotated) { if (annotated.hasAnnotation(Table.class)) { Table table = annotated.getAnnotation(Table.class); return new PropertyName(table.name()); } if (annotated.hasAnnotation(View.class)) { View view = annotated.getAnnotation(View.class); return new PropertyName(view.name()); } else if (annotated.hasAnnotation(Column.class)) { Column column = annotated.getAnnotation(Column.class); return new PropertyName(column.name()); } else { return null; } }
return new ObjectIdInfo(new PropertyName(name), rawClass, ObjectIdGenerators.PropertyGenerator.class, EntityStoreResolver.class);
private static PropertyName _combineNames(String localName, String namespace, String defaultName) { if (MARKER_FOR_DEFAULT.equals(localName)) { if (MARKER_FOR_DEFAULT.equals(namespace)) { return new PropertyName(defaultName); } return new PropertyName(defaultName, namespace); } if (MARKER_FOR_DEFAULT.equals(namespace)) { return new PropertyName(localName); } return new PropertyName(localName, namespace); }
if (am != null) { // should never be null SimpleBeanPropertyDefinition propDef = SimpleBeanPropertyDefinition.construct(ctxt.getConfig(), am, new PropertyName("cause")); SettableBeanProperty prop = constructSettableProperty(ctxt, beanDesc, propDef, am.getParameterType(0));
@Override public PropertyName findRootName(AnnotatedClass ac) { ApiModel model = ac.getAnnotation(ApiModel.class); if (model != null) { return new PropertyName(model.value()); } else { return super.findRootName(ac); } } }
return new PropertyName(Introspector.decapitalize(aeType.getSimpleName()));
@Override public PropertyName findNameForDeserialization(Annotated a) { String rawName = findPropertyName(a); if (rawName != null) { return new PropertyName(rawName); } return null; }
public static PropertyName construct(String simpleName, String ns) { if (simpleName == null) { simpleName = ""; } if (ns == null && simpleName.length() == 0) { return USE_DEFAULT; } return new PropertyName(InternCache.instance.intern(simpleName), ns); }
public BeanPropertyWriter rename(NameTransformer transformer) { String newName = transformer.transform(_name.getValue()); if (newName.equals(_name.toString())) { return this; } return new BeanPropertyWriter(this, new PropertyName(newName)); }
/** * @since 2.3 */ public SettableBeanProperty withSimpleName(String simpleName) { PropertyName n = (_propName == null) ? new PropertyName(simpleName) : _propName.withSimpleName(simpleName); return (n == _propName) ? this : withName(n); }