Package org.jboss.weld.config
Class WeldConfiguration
- java.lang.Object
-
- org.jboss.weld.config.WeldConfiguration
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service
public class WeldConfiguration extends Object implements org.jboss.weld.bootstrap.api.Service
Represents an immutable per-deployment Weld configuration.Each property may be set in three different sources (by priority in descending order):
- In a properties file named `weld.properties`
- As a system property
- By a bootstrap configuration provided by an integrator
For backwards compatibility there are some obsolete sources:
- properties files
org.jboss.weld.executor.properties
andorg.jboss.weld.bootstrap.properties
are also loaded for some configuration keys, - some system properties with obsolete keys are considered
If a configuration key is set in multiple sources (e.g. as a system property and in a
weld.properties
file), the value from the source with higher priority is taken, other values are ignored.If a configuration key is set multiple times in the same source (e.g. different
weld.properties
files) and the values are different, the container automatically detects the problem and treats it as a deployment problem.Unsupported configuration keys are ignored. If an invalid value is set, the container automatically detects the problem and treats it as a deployment problem.
- Author:
- Martin Kouba
- See Also:
ExternalConfiguration
,ConfigurationKey
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIGURATION_FILE
-
Constructor Summary
Constructors Constructor Description WeldConfiguration(org.jboss.weld.bootstrap.api.ServiceRegistry services, org.jboss.weld.bootstrap.spi.Deployment deployment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
Boolean
getBooleanProperty(ConfigurationKey key)
Integer
getIntegerProperty(ConfigurationKey key)
Long
getLongProperty(ConfigurationKey key)
File
getProxyDumpFilePath()
String
getStringProperty(ConfigurationKey key)
boolean
isFinalMethodIgnored(String className)
-
-
-
Field Detail
-
CONFIGURATION_FILE
public static final String CONFIGURATION_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStringProperty
public String getStringProperty(ConfigurationKey key)
- Parameters:
key
-- Returns:
- the property for the given key
- Throws:
IllegalStateException
- If the property type does not match the required type
-
getBooleanProperty
public Boolean getBooleanProperty(ConfigurationKey key)
- Parameters:
key
-- Returns:
- the property for the given key
- Throws:
IllegalStateException
- If the property type does not match the required type
-
getLongProperty
public Long getLongProperty(ConfigurationKey key)
- Parameters:
key
-- Returns:
- the property for the given key
- Throws:
IllegalStateException
- If the property type does not match the required type
-
getIntegerProperty
public Integer getIntegerProperty(ConfigurationKey key)
- Parameters:
key
-- Returns:
- the property for the given key
- Throws:
IllegalStateException
- If the property type does not match the required type
-
getProxyDumpFilePath
public File getProxyDumpFilePath()
- Returns:
- the path or
null
if the generated bytecode should not be dumped - See Also:
ConfigurationKey.PROXY_DUMP
-
isFinalMethodIgnored
public boolean isFinalMethodIgnored(String className)
- Parameters:
className
-- Returns:
true
if the final methods declared on the given type should be ignored,false
otherwise- See Also:
ConfigurationKey.PROXY_IGNORE_FINAL_METHODS
-
cleanup
public void cleanup()
- Specified by:
cleanup
in interfaceorg.jboss.weld.bootstrap.api.Service
-
-