Package org.jboss.weld.bootstrap.api
Enum Environments
- java.lang.Object
-
- java.lang.Enum<Environments>
-
- org.jboss.weld.bootstrap.api.Environments
-
- All Implemented Interfaces:
Serializable
,Comparable<Environments>
,Environment
public enum Environments extends Enum<Environments> implements Environment
Requirements for various well known environments.- Author:
- Pete Muir
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EE
Java EE5 or Java EE6 In this environment, Weld requires thatInjectionServices
are present, and expects the container to use this callback to perform EE-style injectionEE_INJECT
Java EE5 or Java EE6 In this environment, Weld requires thatJpaInjectionServices
,ResourceInjectionServices
andEjbInjectionServices
are present, and so will perform EE-style field injection on managed beans itselfSE
Java SESERVLET
Servlet container such as Tomcat
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Class<? extends Service>>
getRequiredBeanDeploymentArchiveServices()
Set<Class<? extends Service>>
getRequiredDeploymentServices()
The deployment scoped services required for this environmentboolean
isEEModulesAware()
Environment aware of EE modules.static Environments
valueOf(String name)
Returns the enum constant of this type with the specified name.static Environments[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.jboss.weld.bootstrap.api.Environment
automaticallyHandleStartupShutdownEvents
-
-
-
-
Enum Constant Detail
-
EE_INJECT
public static final Environments EE_INJECT
Java EE5 or Java EE6 In this environment, Weld requires thatJpaInjectionServices
,ResourceInjectionServices
andEjbInjectionServices
are present, and so will perform EE-style field injection on managed beans itself
-
EE
public static final Environments EE
Java EE5 or Java EE6 In this environment, Weld requires thatInjectionServices
are present, and expects the container to use this callback to perform EE-style injection
-
SERVLET
public static final Environments SERVLET
Servlet container such as Tomcat
-
SE
public static final Environments SE
Java SE
-
-
Method Detail
-
values
public static Environments[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Environments c : Environments.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Environments valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getRequiredDeploymentServices
public Set<Class<? extends Service>> getRequiredDeploymentServices()
Description copied from interface:Environment
The deployment scoped services required for this environment- Specified by:
getRequiredDeploymentServices
in interfaceEnvironment
- Returns:
- the services to require
-
getRequiredBeanDeploymentArchiveServices
public Set<Class<? extends Service>> getRequiredBeanDeploymentArchiveServices()
- Specified by:
getRequiredBeanDeploymentArchiveServices
in interfaceEnvironment
-
isEEModulesAware
public boolean isEEModulesAware()
Description copied from interface:Environment
Environment aware of EE modules. In such environment each bean archive which belongs to a module should registerEEModuleDescriptor
- Specified by:
isEEModulesAware
in interfaceEnvironment
- Returns:
- true by default
-
-