org.jboss.beans.metadata.api.annotations
Annotation Type Inject


@Retention(value=RUNTIME)
@Target(value={METHOD,PARAMETER,FIELD})
public @interface Inject

Beans when injected by class type are by default changed to configured state - if not yet configured. You can change this behavior by setting state.

Author:
Ales Justin

Optional Element Summary
 String bean
          Get bean.
 String dependentState
          Get dependent state.
 FromContext fromContext
          Get from context injection.
 InjectOption option
          Get injection option.
 String property
          Get property.
 String search
          Get search type.
 AutowireType type
          Get autowire type.
 boolean valid
          Is this @Inject valid.
 String whenRequired
          Get when required.
 

bean

public abstract String bean
Get bean. Default is no bean.

Returns:
bean name
Default:
""

property

public abstract String property
Get property. Default is no property.

Returns:
property name
Default:
""

whenRequired

public abstract String whenRequired
Get when required.

Returns:
when required.
Default:
""

dependentState

public abstract String dependentState
Get dependent state. Default is Installed.

Returns:
dependent state.
Default:
""

search

public abstract String search
Get search type.

Returns:
the search type
Default:
""

type

public abstract AutowireType type
Get autowire type. Default is by class.

Returns:
injection type
Default:
org.jboss.beans.metadata.api.model.AutowireType.BY_CLASS

option

public abstract InjectOption option
Get injection option. Default is Strict.

Returns:
injection option
Default:
org.jboss.beans.metadata.api.model.InjectOption.STRICT

fromContext

public abstract FromContext fromContext
Get from context injection.

Returns:
from context type
Default:
org.jboss.beans.metadata.api.model.FromContext.NOOP

valid

public abstract boolean valid
Is this @Inject valid. Used with @Value.

Returns:
is this instance valid
Default:
true


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.