edu.vt.middleware.ldap.props
public class ConfigParser extends java.lang.Object
MyClass{{propertyOne=foo}{propertyTwo=bar}}
Constructor and Description |
---|
ConfigParser(java.lang.String config)
Creates a new
ConfigParser with the supplied configuration
string. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClassName()
Returns the class name from the configuration.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns the properties from the configuration.
|
java.lang.Object |
initializeType()
Initialize an instance of the class type with the properties contained in
this config.
|
static boolean |
isConfig(java.lang.String config)
Returns whether the supplied configuration data contains a config.
|
protected void |
setProperties(java.lang.Class<?> c,
java.lang.Object o)
Sets the properties on the supplied object.
|
public ConfigParser(java.lang.String config)
ConfigParser
with the supplied configuration
string.config
- String
public java.lang.String getClassName()
String
class namepublic java.util.Map<java.lang.String,java.lang.String> getProperties()
Map
of property name to valuepublic static boolean isConfig(java.lang.String config)
config
- String
boolean
public java.lang.Object initializeType()
Object
of the type the config parsedprotected void setProperties(java.lang.Class<?> c, java.lang.Object o)
c
- Class
type of the supplied objecto
- Object
to invoke properties onCopyright © 2014. All Rights Reserved.