protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder, (Object[]) null); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt); } }
protected Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { // As per [databind#777], allow returning builder itself if (null == _buildMethod) { return builder; } try { return _buildMethod.getMember().invoke(builder, (Object[]) null); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt); } }
/** * Factory method used when Enum instances are to be deserialized * using a zero-/no-args factory method * * @return Deserializer based on given no-args factory method * * @since 2.8 */ public static JsonDeserializer<?> deserializerForNoArgsCreator(DeserializationConfig config, Class<?> enumClass, AnnotatedMethod factory) { if (config.canOverrideAccessModifiers()) { ClassUtil.checkAndFixAccess(factory.getMember(), config.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS)); } return new FactoryBasedEnumDeserializer(enumClass, factory); }
/** * Factory method used when Enum instances are to be deserialized * using a creator (static factory method) * * @return Deserializer based on given factory method * * @since 2.8 */ public static JsonDeserializer<?> deserializerForCreator(DeserializationConfig config, Class<?> enumClass, AnnotatedMethod factory, ValueInstantiator valueInstantiator, SettableBeanProperty[] creatorProps) { if (config.canOverrideAccessModifiers()) { ClassUtil.checkAndFixAccess(factory.getMember(), config.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS)); } return new FactoryBasedEnumDeserializer(enumClass, factory, factory.getParameterType(0), valueInstantiator, creatorProps); }
ClassUtil.checkAndFixAccess(factory.getMember(), ctxt.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
if (buildMethod != null) { // note: can't yet throw error; may be given build method if (config.canOverrideAccessModifiers()) { ClassUtil.checkAndFixAccess(buildMethod.getMember(), config.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt); } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder, (Object[]) null); } catch (Exception e) { return wrapInstantiationProblem(e, ctxt); } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; } }
protected final Object finishBuild(DeserializationContext ctxt, Object builder) throws IOException { try { return _buildMethod.getMember().invoke(builder); } catch (Exception e) { wrapInstantiationProblem(e, ctxt); return null; } }
private static Optional<Method> extractGetterFromPropertyDefinition(BeanPropertyDefinition propertyDefinition) { if (propertyDefinition.getGetter() != null) { return Optional.fromNullable(propertyDefinition.getGetter().getMember()); } return Optional.absent(); }
@Override public boolean isIsGetterVisible(AnnotatedMethod method) { boolean answer = defaultChecker.isIsGetterVisible(method); if (answer) { answer = isGetterMethodWithFieldVisible(method, getIsGetterFieldName( method.getName()), method.getDeclaringClass()) && isGetterMethodRetItselfVisible(method.getMember(), method.getDeclaringClass()); } return answer; }
@Override public boolean isIsGetterVisible(AnnotatedMethod method) { boolean answer = defaultChecker.isIsGetterVisible(method); if (answer) { answer = isGetterMethodWithFieldVisible(method, getIsGetterFieldName( method.getName()), method.getDeclaringClass()) && isGetterMethodRetItselfVisible(method.getMember(), method.getDeclaringClass()); } return answer; }
@Override public boolean isGetterVisible(AnnotatedMethod method) { boolean answer = defaultChecker.isGetterVisible(method); if (answer) { answer = isGetterMethodWithFieldVisible(method, getGetterFieldName( method.getName()), method.getDeclaringClass()) && isGetterMethodRetItselfVisible(method.getMember(), method.getDeclaringClass()); } return answer; }
@Override public boolean isIsGetterVisible(AnnotatedMethod method) { boolean answer = defaultChecker.isIsGetterVisible(method); if (answer) { answer = isGetterMethodWithFieldVisible(method, getIsGetterFieldName( method.getName()), method.getDeclaringClass()) && isGetterMethodRetItselfVisible(method.getMember(), method.getDeclaringClass()); } return answer; }
@Override public boolean isGetterVisible(AnnotatedMethod method) { boolean answer = defaultChecker.isGetterVisible(method); if (answer) { answer = isGetterMethodWithFieldVisible(method, getGetterFieldName( method.getName()), method.getDeclaringClass()) && isGetterMethodRetItselfVisible(method.getMember(), method.getDeclaringClass()); } return answer; }