public class Config
extends java.lang.Object
Constructor and Description |
---|
Config() |
Config(java.lang.ClassLoader loader) |
Modifier and Type | Method and Description |
---|---|
static void |
checkCanInstantiate(java.lang.Class beanClass)
Returns true if the class can be instantiated.
|
static void |
checkCanInstantiate(java.lang.Class beanClass,
java.lang.Class type)
Returns true if the class can be instantiated using zero args constructor
or constructor that accepts an instance of class passed in type argument
|
java.lang.Object |
configure(java.lang.Object obj,
java.io.InputStream is)
Configures a bean with a configuration file.
|
java.lang.Object |
configure(java.lang.Object obj,
java.io.InputStream is,
Schema schema)
Configures a bean with a configuration file.
|
java.lang.Object |
configure(java.lang.Object obj,
java.io.InputStream is,
java.lang.String schemaLocation)
Configures a bean with a configuration file.
|
java.lang.Object |
configure(java.lang.Object obj,
org.w3c.dom.Node topNode)
Configures a bean with a DOM.
|
java.lang.Object |
configure(java.lang.Object obj,
Path path)
Configures a bean with a configuration file.
|
java.lang.Object |
configure(java.lang.Object obj,
Path path,
Schema schema)
Configures a bean with a configuration file and schema.
|
java.lang.Object |
configure(java.lang.Object obj,
Path path,
java.lang.String schemaLocation)
Configures a bean with a configuration file and schema.
|
void |
configureBean(java.lang.Object obj,
org.w3c.dom.Node topNode)
Configures a bean with a DOM.
|
void |
configureBean(java.lang.Object obj,
Path path)
Configures a bean with a configuration file and schema.
|
void |
configureBean(java.lang.Object obj,
Path path,
Schema schema)
Configures a bean with a configuration file and schema.
|
void |
configureBean(java.lang.Object obj,
Path path,
java.lang.String schemaLocation)
Configures a bean with a configuration file and schema.
|
static java.lang.RuntimeException |
createLine(java.lang.String systemId,
int line,
java.lang.Throwable e) |
static ConfigException |
error(java.lang.reflect.Field field,
java.lang.String msg) |
static ConfigException |
error(java.lang.reflect.Method method,
java.lang.String msg) |
static boolean |
evalBoolean(java.lang.String str)
Evaluates an EL boolean in the context.
|
static java.lang.String |
evalString(java.lang.String str)
Evaluates an EL string in the context.
|
static java.lang.String |
evalString(java.lang.String str,
java.util.HashMap<java.lang.String,java.lang.Object> varMap)
Evaluates an EL string in the context.
|
static com.caucho.config.Config.ConfigProperties |
getConfigProperties() |
static java.lang.Object |
getCurrentVar(java.lang.String var)
Sets an EL configuration variable.
|
static ConfigELContext |
getELContext()
Returns the variable resolver.
|
static java.lang.Object |
getElVar(java.lang.String var) |
static ELContext |
getEnvironment()
Returns the variable resolver.
|
static ELContext |
getEnvironment(java.util.HashMap<java.lang.String,java.lang.Object> varMap) |
static java.lang.Object |
getProperty(java.lang.String key)
Returns an environment property
|
static void |
init(java.lang.Object bean) |
static void |
inject(java.lang.Object bean) |
boolean |
isEL()
True if EL expressions are allowed
|
boolean |
isIgnoreEnvironment()
True if environment tags are ignored
|
static java.lang.String |
location(java.lang.reflect.Field field) |
static java.lang.String |
location(java.lang.reflect.Method method) |
static java.lang.Object |
replaceObject(java.lang.Object bean) |
static void |
setAttribute(java.lang.Object obj,
java.lang.String attr,
java.lang.Object value)
Sets an attribute with a value.
|
void |
setEL(boolean isEL)
True if EL expressions are allowed
|
void |
setIgnoreEnvironment(boolean isIgnore)
True if environment tags are ignored
|
static void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets a environment property
|
static void |
setProperty(java.lang.String key,
java.lang.Object value,
java.lang.ClassLoader loader)
Sets a environment property
|
void |
setResinInclude(boolean useResinInclude)
Set true if resin:include should be allowed.
|
static void |
setStringAttribute(java.lang.Object obj,
java.lang.String attr,
java.lang.String value)
Sets an attribute with a value.
|
static void |
validate(java.lang.Class cl,
java.lang.Class api)
Returns true if the class can be instantiated.
|
static void |
validate(java.lang.Class cl,
java.lang.Class api,
java.lang.Class type) |
public Config()
public Config(java.lang.ClassLoader loader)
loader
- the class loader environment to use.public void setResinInclude(boolean useResinInclude)
public boolean isEL()
public void setEL(boolean isEL)
public boolean isIgnoreEnvironment()
public void setIgnoreEnvironment(boolean isIgnore)
public static java.lang.Object getProperty(java.lang.String key)
public static com.caucho.config.Config.ConfigProperties getConfigProperties()
public static void setProperty(java.lang.String key, java.lang.Object value)
public static void setProperty(java.lang.String key, java.lang.Object value, java.lang.ClassLoader loader)
public java.lang.Object configure(java.lang.Object obj, Path path) throws ConfigException, java.io.IOException
ConfigException
java.io.IOException
public java.lang.Object configure(java.lang.Object obj, java.io.InputStream is) throws java.lang.Exception
java.lang.Exception
public java.lang.Object configure(java.lang.Object obj, Path path, java.lang.String schemaLocation) throws ConfigException
ConfigException
public java.lang.Object configure(java.lang.Object obj, Path path, Schema schema) throws ConfigException
ConfigException
public java.lang.Object configure(java.lang.Object obj, java.io.InputStream is, java.lang.String schemaLocation) throws java.lang.Exception
java.lang.Exception
public java.lang.Object configure(java.lang.Object obj, java.io.InputStream is, Schema schema) throws java.lang.Exception
java.lang.Exception
public java.lang.Object configure(java.lang.Object obj, org.w3c.dom.Node topNode) throws java.lang.Exception
java.lang.Exception
public void configureBean(java.lang.Object obj, Path path, java.lang.String schemaLocation) throws java.lang.Exception
java.lang.Exception
public void configureBean(java.lang.Object obj, Path path) throws java.lang.Exception
java.lang.Exception
public void configureBean(java.lang.Object obj, org.w3c.dom.Node topNode) throws java.lang.Exception
java.lang.Exception
public void configureBean(java.lang.Object obj, Path path, Schema schema) throws java.lang.Exception
java.lang.Exception
public static void checkCanInstantiate(java.lang.Class beanClass) throws ConfigException
ConfigException
public static void validate(java.lang.Class cl, java.lang.Class api) throws ConfigException
ConfigException
public static void checkCanInstantiate(java.lang.Class beanClass, java.lang.Class type) throws ConfigException
ConfigException
public static void validate(java.lang.Class cl, java.lang.Class api, java.lang.Class type) throws ConfigException
ConfigException
public static void setAttribute(java.lang.Object obj, java.lang.String attr, java.lang.Object value)
obj
- the bean to be setattr
- the attribute namevalue
- the attribute valuepublic static void setStringAttribute(java.lang.Object obj, java.lang.String attr, java.lang.String value) throws java.lang.Exception
obj
- the bean to be setattr
- the attribute namevalue
- the attribute valuejava.lang.Exception
public static void init(java.lang.Object bean) throws ConfigException
ConfigException
public static void inject(java.lang.Object bean) throws ConfigException
ConfigException
public static java.lang.Object replaceObject(java.lang.Object bean) throws java.lang.Exception
java.lang.Exception
public static ELContext getEnvironment()
public static ConfigELContext getELContext()
public static java.lang.Object getElVar(java.lang.String var)
public static java.lang.Object getCurrentVar(java.lang.String var)
public static java.lang.String evalString(java.lang.String str) throws ELException
ELException
public static java.lang.String evalString(java.lang.String str, java.util.HashMap<java.lang.String,java.lang.Object> varMap) throws ELException
ELException
public static boolean evalBoolean(java.lang.String str) throws ELException
ELException
public static ELContext getEnvironment(java.util.HashMap<java.lang.String,java.lang.Object> varMap)
public static ConfigException error(java.lang.reflect.Field field, java.lang.String msg)
public static ConfigException error(java.lang.reflect.Method method, java.lang.String msg)
public static java.lang.RuntimeException createLine(java.lang.String systemId, int line, java.lang.Throwable e)
public static java.lang.String location(java.lang.reflect.Field field)
public static java.lang.String location(java.lang.reflect.Method method)