org.apache.felix.ipojo.annotations
Annotation Type Requires


@Target(value={FIELD,PARAMETER})
@Inherited
public @interface Requires

This annotation declares a service requirement.

Author:
Felix Project Team

Optional Element Summary
 Class comparator
          Set the comparator.
 Class defaultimplementation
          Set the default-implementation to use if the dependency is optional, and no providers are available.
 String filter
          Set the LDAP filter of the dependency.
 String from
          Set the from attribute.
 String id
          Set the dependency id.
 boolean nullable
          Enable / Disable nullable pattern.
 boolean optional
          Set if the dependency is optional.
 String policy
          Set the binding policy.
 boolean proxy
          Set to true if the service dependency is injected as a proxy.
 String specification
          Set the required service specification.
 

filter

public abstract String filter
Set the LDAP filter of the dependency. Default : no filter

Default:
""

optional

public abstract boolean optional
Set if the dependency is optional. Default : false

Default:
false

id

public abstract String id
Set the dependency id. Default : empty

Default:
""

nullable

public abstract boolean nullable
Enable / Disable nullable pattern. Default : true

Default:
true

defaultimplementation

public abstract Class defaultimplementation
Set the default-implementation to use if the dependency is optional, and no providers are available. The class must implement the required service interface. Default : no default-implementation

Default:
java.lang.Class.class

policy

public abstract String policy
Set the binding policy. Acceptable policy are dynamic, static and dynamic-priority. Default: dynamic.

Default:
"dynamic"

comparator

public abstract Class comparator
Set the comparator. The indicated class must implement Comparator

Default:
java.util.Comparator.class

from

public abstract String from
Set the from attribute.

Default:
""

specification

public abstract String specification
Set the required service specification. This attribute is required for Collection field.

Default:
""

proxy

public abstract boolean proxy
Set to true if the service dependency is injected as a proxy. Default: true

Default:
true


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.