/** * A generic method for performing actions on the <code>object</code>'s hierarchy of * attributes. Allows to customize the bindable marker annotation class. For experts * only. */ static void bind(Object object, IAttributeBinderAction [] attributeBinderActions, Predicate<Field> predicate, Class<? extends Annotation> markerAnnotation) throws InstantiationException, AttributeBindingException { bind(new HashSet<Object>(), new BindingTracker(), 0, object, attributeBinderActions, predicate, markerAnnotation); }
/** * Performs safety checks aimed at reporting attempts to set non-primitive * non-thread-safe primitive instances during initialization. These may lead to * hard-to-trace bugs. * * @see "https://issues.apache.org/jira/browse/SOLR-2282" */ void checkNonPrimitiveInstances(IProcessingComponent processingComponent, Map<String, Object> inputAttributes, Predicate<Field> predicate) throws InstantiationException { AttributeBinder.bind(processingComponent, new IAttributeBinderAction [] { new NonPrimitiveInputAttributesCheck(inputAttributes) }, predicate); } }
/** * A version of {@link #set(Object, Map, boolean, Class...)} with a {@link Predicate} * instead of filtering annotations. For experts only. */ public static Map<String, Object> set(Object object, Map<String, Object> values, boolean checkRequired, Predicate<Field> predicate) throws InstantiationException, AttributeBindingException { final AttributeBinderActionBind attributeBinderActionBind = new AttributeBinderActionBind( values, checkRequired, AttributeTransformerFromString.INSTANCE, AttributeTransformerFactory.INSTANCE); final IAttributeBinderAction [] actions = new IAttributeBinderAction [] { attributeBinderActionBind, }; bind(object, actions, predicate); return attributeBinderActionBind.remainingValues; }
/** * A generic method for performing actions on the <code>object</code>'s hierarchy of * attributes. For experts only. */ public static void bind(Object object, IAttributeBinderAction [] attributeBinderActions, Predicate<Field> predicate) throws InstantiationException, AttributeBindingException { bind(new HashSet<Object>(), new BindingTracker(), 0, object, attributeBinderActions, Predicates.<Field> and(CONSISTENCY_CHECKS, predicate), Bindable.class); }
/** * A generic method for performing actions on the <code>object</code>'s hierarchy of * attributes. For experts only. */ @SafeVarargs public static void bind(Object object, IAttributeBinderAction [] attributeBinderActions, Class<? extends Annotation>... filteringAnnotations) throws InstantiationException, AttributeBindingException { bind(object, attributeBinderActions, filteringAnnotations.length > 0 ? new AllAnnotationsPresentPredicate( filteringAnnotations) : Predicates.<Field> alwaysTrue()); }
}; bind(object, actions, filteringAnnotations);
AttributeBinder.bind(o, actions, p, injectableMarker);
bind(boundObjects, bindingTracker, level + 1, value, attributeBinderActions, predicate, markerAnnotation);