org.apache.felix.ipojo.manipulator.spi
Class AbsBindingModule

java.lang.Object
  extended by org.apache.felix.ipojo.manipulator.spi.AbsBindingModule
All Implemented Interfaces:
java.lang.Iterable<Binding>, Module
Direct Known Subclasses:
DefaultBindingModule

public abstract class AbsBindingModule
extends java.lang.Object
implements Module

All provided Modules have to inherit from this class. It provides a simple to use DSL to express annotation bindings.

Author:
Felix Project Team

Nested Class Summary
 class AbsBindingModule.AnnotationBindingBuilder
          DSL helper class.
 class AbsBindingModule.ConditionalBindingBuilder
           
 
Constructor Summary
AbsBindingModule()
           
 
Method Summary
protected  AbsBindingModule.AnnotationBindingBuilder bind(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Initiate an annotation binding.
 java.util.Iterator<Binding> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.felix.ipojo.manipulator.spi.Module
configure
 

Constructor Detail

AbsBindingModule

public AbsBindingModule()
Method Detail

iterator

public java.util.Iterator<Binding> iterator()
Specified by:
iterator in interface java.lang.Iterable<Binding>

bind

protected AbsBindingModule.AnnotationBindingBuilder bind(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Initiate an annotation binding. Examples:
     AnnotationVisitorFactory factory = new CompositeVisitorFactory();
     bind(Composite.class).to(factory);
     bind(Composite.class).when(.. some condition ..)
                          .to(factory);
 

Parameters:
annotationType - the annotation that will be bound to the AnnotationVisitorFactory


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.