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


@Retention(value=RUNTIME)
@Target(value={METHOD,PARAMETER})
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.
 InjectType type
          Get injection 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:
"Installed"

type

public abstract InjectType type
Get injection type. Default is by class.

Returns:
injection type
Default:
BY_CLASS

option

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

Returns:
injection option
Default:
STRICT

fromContext

public abstract FromContext fromContext
Get from context injection.

Returns:
from context type
Default:
NONE

valid

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

Returns:
is this instance valid
Default:
true


Copyright ? 2007 JBoss Inc.. All Rights Reserved.