|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.util.props.PropertySheet
public class PropertySheet
A property sheet which defines a collection of properties for a single component in the system.
| Nested Class Summary | |
|---|---|
static class |
PropertySheet.PropertyType
|
| Constructor Summary | |
|---|---|
PropertySheet(java.lang.Class<? extends Configurable> confClass,
java.lang.String name,
ConfigurationManager cm,
RawPropertyData rpd)
|
|
PropertySheet(Configurable configurable,
java.lang.String name,
RawPropertyData rpd,
ConfigurationManager ConfigurationManager)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns true if two property sheet define the same object in terms of configuration. |
java.lang.Boolean |
getBoolean(java.lang.String name)
Gets the value associated with this name |
Configurable |
getComponent(java.lang.String name)
Gets a component associated with the given parameter name |
java.lang.Class<? extends Configurable> |
getComponentClass(java.lang.String propName)
Returns the class of of a registered component property without instantiating it. |
java.util.List<? extends Configurable> |
getComponentList(java.lang.String name)
Gets a list of components associated with the given parameter name |
java.lang.Class<? extends Configurable> |
getConfigurableClass()
Returns the class of the owner configurable of this property sheet. |
double |
getDouble(java.lang.String name)
Gets the value associated with this name |
float |
getFloat(java.lang.String name)
Gets the value associated with this name |
java.lang.String |
getInstanceName()
|
int |
getInt(java.lang.String name)
Gets the value associated with this name |
java.util.logging.Logger |
getLogger()
Returns a logger to use for this configurable component. |
Configurable |
getOwner()
Returns the owner of this property sheet. |
S4PropWrapper |
getProperty(java.lang.String name,
java.lang.Class propertyClass)
Returns the property names name which is still wrapped into the annotation instance. |
java.lang.Object |
getRaw(java.lang.String name)
Gets the raw value associated with this name |
java.lang.Object |
getRawNoReplacement(java.lang.String name)
Gets the raw value associated with this name, no global symbol replacement is performed. |
java.util.Collection<java.lang.String> |
getRegisteredProperties()
Returns the names of registered properties of this PropertySheet object. |
java.lang.String |
getString(java.lang.String name)
Gets the value associated with this name |
PropertySheet.PropertyType |
getType(java.lang.String propName)
Returns the type of the given property. |
boolean |
isInstanciated()
Returns true if the owner of this property sheet is already instanciated. |
static void |
processAnnotations(PropertySheet propertySheet,
java.lang.Class<? extends Configurable> configurable)
use annotation based class parsing to detect the configurable properties of a Configurable-class |
void |
setBoolean(java.lang.String name,
java.lang.Boolean value)
Sets the given property to the given name |
void |
setCM(ConfigurationManager cm)
|
void |
setComponent(java.lang.String name,
java.lang.String cmName,
Configurable value)
Sets the given property to the given name |
void |
setComponentList(java.lang.String name,
java.util.List<java.lang.String> valueNames,
java.util.List<Configurable> value)
Sets the given property to the given name |
void |
setDouble(java.lang.String name,
double value)
Sets the given property to the given name |
void |
setInstanceName(java.lang.String newInstanceName)
|
void |
setInt(java.lang.String name,
int value)
Sets the given property to the given name |
void |
setString(java.lang.String name,
java.lang.String value)
Sets the given property to the given name |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertySheet(Configurable configurable,
java.lang.String name,
RawPropertyData rpd,
ConfigurationManager ConfigurationManager)
public PropertySheet(java.lang.Class<? extends Configurable> confClass,
java.lang.String name,
ConfigurationManager cm,
RawPropertyData rpd)
| Method Detail |
|---|
public S4PropWrapper getProperty(java.lang.String name,
java.lang.Class propertyClass)
throws PropertyException
name which is still wrapped into the annotation instance.
PropertyException
public java.lang.String getString(java.lang.String name)
throws PropertyException
name - the name
PropertyException
public int getInt(java.lang.String name)
throws PropertyException
name - the name
PropertyException - if the named property is not of this type
public float getFloat(java.lang.String name)
throws PropertyException
name - the name
PropertyException - if the named property is not of this type
public double getDouble(java.lang.String name)
throws PropertyException
name - the name
PropertyException - if the named property is not of this type
public java.lang.Boolean getBoolean(java.lang.String name)
throws PropertyException
name - the name
PropertyException - if the named property is not of this type
public Configurable getComponent(java.lang.String name)
throws PropertyException
name - the parameter name
PropertyException - if the component does not exist or is of the wrong type.public java.lang.Class<? extends Configurable> getComponentClass(java.lang.String propName)
public java.util.List<? extends Configurable> getComponentList(java.lang.String name)
throws InternalConfigurationException
name - the parameter name
PropertyException - if the component does not exist or is of the wrong type.
InternalConfigurationExceptionpublic java.lang.String getInstanceName()
public void setInstanceName(java.lang.String newInstanceName)
public boolean isInstanciated()
public Configurable getOwner()
public java.lang.Class<? extends Configurable> getConfigurableClass()
public void setString(java.lang.String name,
java.lang.String value)
throws PropertyException
name - the simple property name
PropertyException
public void setInt(java.lang.String name,
int value)
throws PropertyException
name - the simple property namevalue - the value for the property
PropertyException
public void setDouble(java.lang.String name,
double value)
throws PropertyException
name - the simple property namevalue - the value for the property
PropertyException
public void setBoolean(java.lang.String name,
java.lang.Boolean value)
throws PropertyException
name - the simple property namevalue - the value for the property
PropertyException
public void setComponent(java.lang.String name,
java.lang.String cmName,
Configurable value)
throws PropertyException
name - the simple property namecmName - the name of the configurable within the configuration manager (required for serialization only)value - the value for the property
PropertyException
public void setComponentList(java.lang.String name,
java.util.List<java.lang.String> valueNames,
java.util.List<Configurable> value)
throws PropertyException
name - the simple property namevalueNames - the list of names of the configurables within the configuration manager (required for
serialization only)value - the value for the property
PropertyExceptionpublic java.lang.Object getRaw(java.lang.String name)
name - the name
public java.lang.Object getRawNoReplacement(java.lang.String name)
name - the name
public PropertySheet.PropertyType getType(java.lang.String propName)
public java.util.logging.Logger getLogger()
PropertyException - if an error occurspublic java.util.Collection<java.lang.String> getRegisteredProperties()
public void setCM(ConfigurationManager cm)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public static void processAnnotations(PropertySheet propertySheet,
java.lang.Class<? extends Configurable> configurable)
Configurable-class
propertySheet - of type PropertySheetconfigurable - of type Class extends Configurable>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||