+ public boolean isCompatible(Object o) { return isCompatible(Bindable.create(o)); }
+ public boolean isCompatible(Bindable _bindable) {
+ bind.as t = _bindable.getAnnotation(bind.as.class);
+ bind b = _bindable.getAnnotation(bind.class);
+
+ boolean ok = false;
+ if (t != null && (t.value().equals(tag))) ok = true;
+ if (t != null && ((t.value().equals("") && _bindable.getSimpleName().equals(tag)))) ok = true;
+ if (b != null && _bindable.getSimpleName().equals(tag)) ok = true;
+
+ if (ok) return buildSequence(_bindable)!=null;
+
+ return false;
+ }
+
+ public Sequence makeSequence(Object o) { return makeSequence(Bindable.create(o)); }
+ public Sequence makeSequence(final Bindable _bindable) {
+
+ /*
+ if (_bindable.getArgTypes().length > 0 &&
+ _bindable.getArgTypes()[0] == Input.Region.class) {
+ Functor<Input.Region,Object> func = new Functor<Input.Region,Object>() {
+ int[] map = buildSequence(_bindable);
+ public Object invoke(final Input.Region region) { return _bindable.createBinding(map, region); }
+ };
+ return Sequence.newRegionRewritingSequence(func, elements, drops);
+ }
+ */
+
+ if (_bindable.isAnnotationPresent(bind.raw.class))
+ return Sequence.create(new RawBindingFunctor(tag(), _bindable.createBinding()), elements, drops, false);
+ int[] map = buildSequence(_bindable);
+ return Sequence.create(new BindingFunctor(tag(), _bindable.createBinding()), elements, drops, false);
+ }
+