/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
public static CreatorCandidate construct(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition[] propDefs) { final int pcount = creator.getParameterCount(); Param[] params = new Param[pcount]; for (int i = 0; i < pcount; ++i) { AnnotatedParameter annParam = creator.getParameter(i); JacksonInject.Value injectId = intr.findInjectableValue(annParam); params[i] = new Param(annParam, (propDefs == null) ? null : propDefs[i], injectId); } return new CreatorCandidate(intr, creator, params, pcount); }
AnnotationIntrospector intr = config.getAnnotationIntrospector(); if (intr != null) { AnnotatedParameter delegate = creator.getParameter(ix);
SettableBeanProperty[] properties = new SettableBeanProperty[argCount]; for (int i = 0; i < argCount; ++i) { final AnnotatedParameter param = ctor.getParameter(i); final PropertyName name = _findParamName(param, intr);
private boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) { // If explicit name, or inject id, property-based if (((propDef != null) && propDef.isExplicitlyNamed()) || (intr.findInjectableValue(creator.getParameter(0)) != null)) { return true; } if (propDef != null) { // One more thing: if implicit name matches property with a getter // or field, we'll consider it property-based as well String implName = propDef.getName(); if (implName != null && !implName.isEmpty()) { if (propDef.couldSerialize()) { return true; } } } // in absence of everything else, default to delegating return false; }
public static CreatorCandidate construct(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition[] propDefs) { final int pcount = creator.getParameterCount(); Param[] params = new Param[pcount]; for (int i = 0; i < pcount; ++i) { AnnotatedParameter annParam = creator.getParameter(i); JacksonInject.Value injectId = intr.findInjectableValue(annParam); params[i] = new Param(annParam, (propDefs == null) ? null : propDefs[i], injectId); } return new CreatorCandidate(intr, creator, params, pcount); }
final AnnotatedParameter param = factory.getParameter(i); BeanPropertyDefinition propDef = (propDefs == null) ? null : propDefs[i]; JacksonInject.Value injectable = intr.findInjectableValue(param);
/** * @deprecated Since 2.5, does not seem to be used at all. */ @Deprecated public List<PropertyName> findCreatorParameterNames() { 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; PropertyName name = _findCreatorPropertyName(creator.getParameter(0)); if (name == null || name.isEmpty()) { continue; } List<PropertyName> names = new ArrayList<PropertyName>(); names.add(name); for (int p = 1; p < argCount; ++p) { name = _findCreatorPropertyName(creator.getParameter(p)); names.add(name); } return names; } } return Collections.emptyList(); }
final AnnotatedParameter param = ctor.getParameter(i); BeanPropertyDefinition propDef = candidate.propertyDef(i); JacksonInject.Value injectId = intr.findInjectableValue(param);
/** * @deprecated Since 2.5, does not seem to be used at all. */ @Deprecated public List<PropertyName> findCreatorParameterNames() { 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; PropertyName name = _findCreatorPropertyName(creator.getParameter(0)); if (name == null || name.isEmpty()) { continue; } List<PropertyName> names = new ArrayList<PropertyName>(); names.add(name); for (int p = 1; p < argCount; ++p) { name = _findCreatorPropertyName(creator.getParameter(p)); names.add(name); } return names; } } return Collections.emptyList(); }
/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
/** * Method called by parameter object when an augmented instance is created; * needs to replace parameter with new instance */ protected AnnotatedParameter replaceParameterAnnotations(int index, AnnotationMap ann) { _paramAnnotations[index] = ann; return getParameter(index); }
private boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) { // If explicit name, or inject id, property-based if (((propDef != null) && propDef.isExplicitlyNamed()) || (intr.findInjectableValue(creator.getParameter(0)) != null)) { return true; } if (propDef != null) { // One more thing: if implicit name matches property with a getter // or field, we'll consider it property-based as well String implName = propDef.getName(); if (implName != null && !implName.isEmpty()) { if (propDef.couldSerialize()) { return true; } } } // in absence of everything else, default to delegating return false; }
protected boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) { JsonCreator.Mode mode = intr.findCreatorBinding(creator); if (mode == JsonCreator.Mode.PROPERTIES) { return true; } if (mode == JsonCreator.Mode.DELEGATING) { return false; } // If explicit name, or inject id, property-based if (((propDef != null) && propDef.isExplicitlyNamed()) || (intr.findInjectableValueId(creator.getParameter(0)) != null)) { return true; } if (propDef != null) { // One more thing: if implicit name matches property with a getter // or field, we'll consider it property-based as well String implName = propDef.getName(); if (implName != null && !implName.isEmpty()) { if (propDef.couldSerialize()) { return true; } } } // in absence of everything else, default to delegating return false; }
protected boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) { JsonCreator.Mode mode = intr.findCreatorBinding(creator); if (mode == JsonCreator.Mode.PROPERTIES) { return true; } if (mode == JsonCreator.Mode.DELEGATING) { return false; } // If explicit name, or inject id, property-based if (((propDef != null) && propDef.isExplicitlyNamed()) || (intr.findInjectableValueId(creator.getParameter(0)) != null)) { return true; } if (propDef != null) { // One more thing: if implicit name matches property with a getter // or field, we'll consider it property-based as well String implName = propDef.getName(); if (implName != null && !implName.isEmpty()) { if (propDef.couldSerialize()) { return true; } } } // in absence of everything else, default to delegating return false; }
protected boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) { JsonCreator.Mode mode = intr.findCreatorBinding(creator); if (mode == JsonCreator.Mode.PROPERTIES) { return true; } if (mode == JsonCreator.Mode.DELEGATING) { return false; } // If explicit name, or inject id, property-based if (((propDef != null) && propDef.isExplicitlyNamed()) || (intr.findInjectableValueId(creator.getParameter(0)) != null)) { return true; } if (propDef != null) { // One more thing: if implicit name matches property with a getter // or field, we'll consider it property-based as well String implName = propDef.getName(); if (implName != null && !implName.isEmpty()) { if (propDef.couldSerialize()) { return true; } } } // in absence of everything else, default to delegating return false; }