/** * Method for getting ordered list of named Creator properties. Returns an empty list is none * found. If multiple Creator methods are defined, order between properties from different methods * is undefined; however, properties for each such Creator are ordered properly relative to each * other. For the usual case of just a single Creator, named properties are thus properly ordered. */ public List<String> findCreatorPropertyNames() { List<String> names = null; for (int i = 0; i < 2; ++i) { List<? extends AnnotatedWithParams> l = (i == 0) ? getConstructors() : getFactoryMethods(); for (AnnotatedWithParams creator : l) { int argCount = creator.getParameterCount(); if (argCount < 1) continue; String name = _annotationIntrospector.findPropertyNameForParam(creator.getParameter(0)); if (name == null) continue; if (names == null) { names = new ArrayList<String>(); } names.add(name); for (int p = 1; p < argCount; ++p) { names.add(_annotationIntrospector.findPropertyNameForParam(creator.getParameter(p))); } } } if (names == null) { return Collections.emptyList(); } return names; }
/** @deprecated Since 1.9, should use factory methods instead */ @Deprecated public BasicBeanDescription(MapperConfig<?> config, JavaType type, AnnotatedClass ac) { this(config, type, ac, Collections.<BeanPropertyDefinition>emptyList()); }
/** * Factory method to use for constructing an instance to use for purposes other than building * serializers or deserializers; will only have information on class, not on properties. * * @since 1.9 */ public static BasicBeanDescription forOtherUse( MapperConfig<?> config, JavaType type, AnnotatedClass ac) { return new BasicBeanDescription( config, type, ac, Collections.<BeanPropertyDefinition>emptyList()); }